int() also throws TypeError

master
Christopher Teutsch 3 years ago
parent 8e36e1ffda
commit b2cdbf13e3

@ -1,5 +1,5 @@
def int_or_none(val) -> int or None:
try:
return int(val)
except ValueError:
except (ValueError, TypeError):
return None
Loading…
Cancel
Save