Explorar o código

Catch Exception instead of using bare except

Max Zheng %!s(int64=7) %!d(string=hai) anos
pai
achega
bb7d012b0a
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      programs/more_decorator.py

+ 1 - 1
programs/more_decorator.py

@@ -12,7 +12,7 @@ def retry(f):
         for attempt in range(1, MAX_ATTEMPTS + 1):
             try:
                 return f(*args, **kwargs)
-            except:
+            except Exception:
                 log.exception("Attempt %s/%s failed : %s",
                               attempt,
                               MAX_ATTEMPTS,