mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 14:22:46 +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:
@@ -275,7 +275,7 @@ def main():
|
||||
if secure == 'always':
|
||||
module.fail_json(rc=1, msg='Unable to start an encrypted session to %s:%s: %s' %
|
||||
(host, port, to_native(e)), exception=traceback.format_exc())
|
||||
except:
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if not secure_state:
|
||||
|
||||
Reference in New Issue
Block a user