Skip to content

Commit

Permalink
Trivial: Do not prepend class name if instance of Warning
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.code.sf.net/p/dispcalgui/code/trunk@4696 6ae35eb0-b8ff-4ca7-919d-0ec1eff389cd
  • Loading branch information
fhoech committed Aug 3, 2017
1 parent c4ad2a0 commit 2ac6693
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DisplayCAL/util_str.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ def safe_basestring(obj):
obj = str(obj)
except UnicodeEncodeError:
obj = repr(obj)
if isinstance(oobj, Exception):
if isinstance(oobj, Exception) and not isinstance(oobj, Warning):
if obj and oobj.__class__.__name__ in dir(exceptions):
obj = obj[0].capitalize() + obj[1:]
module = getattr(oobj, "__module__", "")
Expand Down

0 comments on commit 2ac6693

Please sign in to comment.