Merge pull request #5162 from JensRantil/fix-corrupt-module-outputs

More don't catch `SystemExit`
reviewable/pr18780/r1
Michael DeHaan 11 years ago
commit 88ebec7908

@ -214,7 +214,7 @@ def main():
m = int(minutes) m = int(minutes)
if not isinstance(m, types.IntType): if not isinstance(m, types.IntType):
module.fail_json(msg='minutes must be a number') module.fail_json(msg='minutes must be a number')
except: except Exception:
module.fail_json(msg='invalid entry for minutes') module.fail_json(msg='invalid entry for minutes')
################################################################## ##################################################################

@ -138,7 +138,7 @@ def download_key(module, url):
module.fail_json("error connecting to download key from url") module.fail_json("error connecting to download key from url")
data = connection.read() data = connection.read()
return data return data
except: except Exception:
module.fail_json(msg="error getting key id from url", traceback=format_exc()) module.fail_json(msg="error getting key id from url", traceback=format_exc())

Loading…
Cancel
Save