Skip to content

Commit

Permalink
Use more explicit exception handler for #526
Browse files Browse the repository at this point in the history
  • Loading branch information
timlinux committed Mar 7, 2013
1 parent f660172 commit 2679e1f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions safe/impact_functions/core.py
Expand Up @@ -796,7 +796,7 @@ def format_int(x):
Returns:
str - a locale friendly formatted string e.g. 1,000,0000.00
representing the original x. If any exception occurs,
representing the original x. If a ValueError exception occurs,
x is simply returned.
Raises:
Expand All @@ -823,8 +823,8 @@ def format_int(x):
try:
s = '{0:,}'.format(x)
#s = '{0:n}'.format(x) # n means locale aware (read up on this)
# see issue #526 TODO check exactly what exception is being thrown
except: # pylint: disable=W0702
# see issue #526
except ValueError:
return x

# Quick solution for the moment
Expand Down

0 comments on commit 2679e1f

Please sign in to comment.