summaryrefslogtreecommitdiff
path: root/hacking
diff options
context:
space:
mode:
authorToshio Kuratomi <a.badger@gmail.com>2018-09-07 17:59:46 -0700
committerToshio Kuratomi <a.badger@gmail.com>2018-12-16 15:03:19 -0800
commit3fba0062078cc04eabb460ec1eb13a4739235199 (patch)
tree9c09103ce103a90f97ccf3736ca6c2502d7860f8 /hacking
parent5147e792d398258a5a87c3271ea89c1c4fd2f4d3 (diff)
downloadansible-3fba0062078cc04eabb460ec1eb13a4739235199.tar.gz
Update bare exceptions to specify Exception.
This will keep us from accidentally catching program-exiting exceptions like KeyboardInterupt and SystemExit.
Diffstat (limited to 'hacking')
-rwxr-xr-xhacking/test-module2
-rwxr-xr-xhacking/tests/gen_distribution_version_testcase.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/hacking/test-module b/hacking/test-module
index cb4398334c..5e20317037 100755
--- a/hacking/test-module
+++ b/hacking/test-module
@@ -221,7 +221,7 @@ def runtest(modfile, argspath, modname, module_style, interpreters):
print(out)
print(err)
results = json.loads(out)
- except:
+ except Exception:
print("*" * 35)
print("INVALID OUTPUT FORMAT")
print(out)
diff --git a/hacking/tests/gen_distribution_version_testcase.py b/hacking/tests/gen_distribution_version_testcase.py
index fdd0a058bc..6bc52c4e41 100755
--- a/hacking/tests/gen_distribution_version_testcase.py
+++ b/hacking/tests/gen_distribution_version_testcase.py
@@ -62,7 +62,7 @@ ansible_facts = {}
for fact in facts:
try:
ansible_facts[fact] = parsed['ansible_facts']['ansible_' + fact]
- except:
+ except Exception:
ansible_facts[fact] = "N/A"
nicename = ansible_facts['distribution'] + ' ' + ansible_facts['distribution_version']