Skip to content

Commit

Permalink
Set to _get_debug_level to attempt to convert a string input to integer
Browse files Browse the repository at this point in the history
  • Loading branch information
evandrocoan committed Sep 4, 2019
1 parent 92d9d4b commit 671db28
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion all/debug_tools/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -1557,7 +1557,12 @@ def _get_debug_level(debug_level, logger_name):
else:

if not isinstance( debug_level, int ):
raise ValueError( "The variable `debug_level` must be an instance of int, instead of `%s`." % debug_level )

try:
debug_level = int( debug_level )

except Exception as error:
raise ValueError( "The variable `debug_level` must be an instance of int, instead of `%s` (%s)." % ( debug_level, error ) )

else:

Expand Down

0 comments on commit 671db28

Please sign in to comment.