[eporner] Simplify and correct (#3629)

This commit is contained in:
Philipp Hagemeister 2014-08-31 23:51:36 +02:00
parent 04b4aa4a7b
commit 48d4681efc
2 changed files with 25 additions and 18 deletions

View file

@ -1318,6 +1318,7 @@ def str_or_none(v, default=None):
def str_to_int(int_str):
""" A more relaxed version of int_or_none """
if int_str is None:
return None
int_str = re.sub(r'[,\.]', u'', int_str)