summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-05-06 23:40:43 +0200
committerThomas Haller <thaller@redhat.com>2020-05-07 13:58:14 +0200
commitc7d0a8605067a7b86a36bc2ce5470d0367a4d737 (patch)
tree20ea7971649d14abf44b251458da1b6cbc48c1b6 /examples
parent5c08981356a1038f49050d748f09d859bf471810 (diff)
downloadNetworkManager-c7d0a8605067a7b86a36bc2ce5470d0367a4d737.tar.gz
examples: avoid "except" for BaseException in examples
lgtm.com flags this as "Except block directly handles BaseException".
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/python/gi/checkpoint.py2
-rwxr-xr-xexamples/python/gi/nm-wg-set2
2 files changed, 2 insertions, 2 deletions
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: