da2a11adf9
This reverts commit 0494a36681
.
12 lines
246 B
Python
Executable file
12 lines
246 B
Python
Executable file
def safe_int_or_none(value):
|
|
try:
|
|
return int(value)
|
|
except (ValueError, TypeError):
|
|
return None
|
|
|
|
|
|
def safe_float_or_none(value):
|
|
try:
|
|
return float(value)
|
|
except (ValueError, TypeError):
|
|
return None
|