mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 05:42:50 +00:00
Update bare exceptions to specify Exception.
This will keep us from accidentally catching program-exiting exceptions like KeyboardInterupt and SystemExit.
This commit is contained in:
@@ -116,7 +116,7 @@ def retry(retries=None, retry_pause=1):
|
||||
raise Exception("Retry limit exceeded: %d" % retries)
|
||||
try:
|
||||
ret = f(*args, **kwargs)
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
if ret:
|
||||
break
|
||||
|
||||
Reference in New Issue
Block a user