1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

module(nagios): don't catch SystemExit

If we do this, we risk outputting two JSON payloads, which will be
unparsable.
This commit is contained in:
Jens Rantil 2013-12-04 13:55:16 +01:00
parent 8f2580fc98
commit 153df0a23e

View file

@ -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')
################################################################## ##################################################################