mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-26 06:30:36 +01:00
examples: avoid "except" for BaseException in examples
lgtm.com flags this as "Except block directly handles BaseException".
This commit is contained in:
parent
5c08981356
commit
c7d0a86050
2 changed files with 2 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue