소스 검색

Catch Exception instead of using bare except

Max Zheng 7 년 전
부모
커밋
bb7d012b0a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  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,