diff --git a/progressbar/__about__.py b/progressbar/__about__.py index 279c7068..3fc1edeb 100644 --- a/progressbar/__about__.py +++ b/progressbar/__about__.py @@ -19,7 +19,7 @@ long running operations. '''.strip().split()) __email__ = 'wolph@wol.ph' -__version__ = '3.34.3' +__version__ = '3.34.4' __license__ = 'BSD' __copyright__ = 'Copyright 2015 Rick van Hattem (Wolph)' __url__ = 'https://github.com/WoLpH/python-progressbar' diff --git a/progressbar/widgets.py b/progressbar/widgets.py index 4b837568..f1b3a4ee 100644 --- a/progressbar/widgets.py +++ b/progressbar/widgets.py @@ -198,7 +198,7 @@ def __call__(self, progress, data, **kwargs): data[name] = data[key] else: data[name] = transform(data[key]) - except: # pragma: no cover + except (KeyError, ValueError, IndexError): # pragma: no cover pass return FormatWidgetMixin.__call__(self, progress, data, **kwargs) diff --git a/tests/test_stream.py b/tests/test_stream.py index 3939e09f..0c540b47 100644 --- a/tests/test_stream.py +++ b/tests/test_stream.py @@ -59,7 +59,7 @@ def test_excepthook(): try: raise RuntimeError() - except: + except RuntimeError: progressbar.streams.excepthook(*sys.exc_info()) progressbar.streams.unwrap_excepthook()