examples: avoid "except" for BaseException in examples
lgtm.com flags this as "Except block directly handles BaseException".
This commit is contained in:
@@ -134,7 +134,7 @@ def do_adjust_rollback_timeout(client):
|
|||||||
sys.exit("Missing timeout")
|
sys.exit("Missing timeout")
|
||||||
try:
|
try:
|
||||||
add_timeout = int(sys.argv[3])
|
add_timeout = int(sys.argv[3])
|
||||||
except:
|
except Exception:
|
||||||
sys.exit("Invalid timeout")
|
sys.exit("Invalid timeout")
|
||||||
|
|
||||||
path = validate_path(sys.argv[2], client)
|
path = validate_path(sys.argv[2], client)
|
||||||
|
@@ -442,7 +442,7 @@ if __name__ == '__main__':
|
|||||||
secrets = conn.get_secrets(NM.SETTING_WIREGUARD_SETTING_NAME)
|
secrets = conn.get_secrets(NM.SETTING_WIREGUARD_SETTING_NAME)
|
||||||
if secrets:
|
if secrets:
|
||||||
conn.update_secrets(NM.SETTING_WIREGUARD_SETTING_NAME, secrets)
|
conn.update_secrets(NM.SETTING_WIREGUARD_SETTING_NAME, secrets)
|
||||||
except:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
if not argv:
|
if not argv:
|
||||||
|
Reference in New Issue
Block a user