atoi() was getting redundant, and unfortunately we can't easily load helpers.py in some places where we'd want to, because it depends on vars.py. So move it to its own module.
6 lines
90 B
Python
6 lines
90 B
Python
|
|
def atoi(v):
|
|
try:
|
|
return int(v or 0)
|
|
except ValueError:
|
|
return 0
|