diff options
author | Marien Zwart <marien.zwart@gmail.com> | 2010-03-07 18:34:54 -0500 |
---|---|---|
committer | Marien Zwart <marien.zwart@gmail.com> | 2010-03-07 18:34:54 -0500 |
commit | da00b93f974e41dc8e8c393f679a9cee3b3c8d1a (patch) | |
tree | 60c5908f98e1fb48974b80c839435c2f6273018d /urwid/widget.py | |
parent | a57c3129a1486d6d1c3887b761593cd31bb1a720 (diff) | |
download | urwid-da00b93f974e41dc8e8c393f679a9cee3b3c8d1a.tar.gz |
Remove unnecessary use of "except:" (without an exception class).
Diffstat (limited to 'urwid/widget.py')
-rw-r--r-- | urwid/widget.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/urwid/widget.py b/urwid/widget.py index 4b1c14e..cbdeb8b 100644 --- a/urwid/widget.py +++ b/urwid/widget.py @@ -30,7 +30,7 @@ from urwid.command_map import command_map from urwid.split_repr import split_repr, remove_defaults try: set -except: set = list # not perfect, but should be good enough for python2.3 +except NameError: set = list # not perfect, but should be good enough for python2.3 # Widget sizing methods @@ -910,7 +910,7 @@ class Edit(Text): if type(text) not in (str, unicode): try: text = unicode(text) - except: + except Exception: raise EditError("Can't convert edit text to a string!") self.highlight = None self._emit("change", text) |