diff --git a/examples/python/gi/checkpoint.py b/examples/python/gi/checkpoint.py index b1ecbb8984..a695a64613 100755 --- a/examples/python/gi/checkpoint.py +++ b/examples/python/gi/checkpoint.py @@ -134,7 +134,7 @@ def do_adjust_rollback_timeout(client): sys.exit("Missing timeout") try: add_timeout = int(sys.argv[3]) - except: + except Exception: sys.exit("Invalid timeout") path = validate_path(sys.argv[2], client) diff --git a/examples/python/gi/nm-wg-set b/examples/python/gi/nm-wg-set index 81d86c7c0a..1f5279ee69 100755 --- a/examples/python/gi/nm-wg-set +++ b/examples/python/gi/nm-wg-set @@ -442,7 +442,7 @@ if __name__ == '__main__': secrets = conn.get_secrets(NM.SETTING_WIREGUARD_SETTING_NAME) if secrets: conn.update_secrets(NM.SETTING_WIREGUARD_SETTING_NAME, secrets) - except: + except Exception: pass if not argv: