diff --git a/peru/cache.py b/peru/cache.py index 3114f13..9d22f06 100644 --- a/peru/cache.py +++ b/peru/cache.py @@ -524,7 +524,7 @@ def delete_if_error(path): given path, and allow the exception to continue.''' try: yield - except: + except Exception: if os.path.exists(path): os.remove(path) raise diff --git a/peru/edit_yaml.py b/peru/edit_yaml.py index b225d58..93a1884 100644 --- a/peru/edit_yaml.py +++ b/peru/edit_yaml.py @@ -32,12 +32,12 @@ def _maybe_quote(val): try: int(val) needs_quoting = True - except: + except Exception: pass try: float(val) needs_quoting = True - except: + except Exception: pass if needs_quoting: return '"{}"'.format(val) diff --git a/peru/runtime.py b/peru/runtime.py index 7c876f1..d4f4097 100644 --- a/peru/runtime.py +++ b/peru/runtime.py @@ -176,7 +176,7 @@ def _get_parallel_fetch_limit(args): if parallel <= 0: raise PrintableError('Argument to --jobs must be 1 or more.') return parallel - except: + except Exception: raise PrintableError('Argument to --jobs must be a number.')