Skip to content

Commit

Permalink
Minor var_view safety fix
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Sep 6, 2013
1 parent 8931a69 commit 135774e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions pudb/var_view.py
Expand Up @@ -221,9 +221,12 @@ def type_stringifier(value):
if HAVE_NUMPY and isinstance(value, numpy.ndarray):
return "ndarray %s %s" % (value.dtype, value.shape)
elif isinstance(value, STR_SAFE_TYPES):
return str(value)
else:
return type(value).__name__
try:
return str(value)
except Exception:
pass

return type(value).__name__


def get_stringifier(iinfo):
Expand Down

0 comments on commit 135774e

Please sign in to comment.