Skip to content

Commit

Permalink
wmlunits: Handle TypeError on int_fallback() (in particular to deal w…
Browse files Browse the repository at this point in the history
…ith None)
  • Loading branch information
irydacea committed Aug 13, 2017
1 parent 0f171cd commit 3746925
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions data/tools/unit_tree/html_output.py
Expand Up @@ -171,6 +171,8 @@ def reset_errors():
def int_fallback(str_value, int_fallback=0):
try:
return int(str_value)
except TypeError:
return int_fallback
except ValueError:
return int_fallback

Expand Down

0 comments on commit 3746925

Please sign in to comment.