diff options
author | Timothy Asir Jeyasingh <tjeyasin@redhat.com> | 2014-06-24 15:15:43 +0530 |
---|---|---|
committer | Sahina Bose <sabose@redhat.com> | 2014-06-26 01:56:35 -0700 |
commit | 1d1b95d1e84383bdd6d53ffbd9e0a21b06fece24 (patch) | |
tree | 0a2f34f6090f13367de37856d99866d68e8deff0 /plugins/hostsnmptrapgenerator.py.in | |
parent | a533d0bda1d7bccccfc5f8f61efc1c3e16169a13 (diff) |
fix pep8 errors
Change-Id: Ia0f570dfb74d6c41484e509f704df12d3b96db17
Signed-off-by: Timothy Asir Jeyasingh <tjeyasin@redhat.com>
Reviewed-on: http://review.gluster.org/8161
Tested-by: Timothy Asir <tim.gluster@gmail.com>
Reviewed-by: Shubhendu Tripathi <shtripat@redhat.com>
Diffstat (limited to 'plugins/hostsnmptrapgenerator.py.in')
-rwxr-xr-x | plugins/hostsnmptrapgenerator.py.in | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/plugins/hostsnmptrapgenerator.py.in b/plugins/hostsnmptrapgenerator.py.in index a358de1..ca6c08f 100755 --- a/plugins/hostsnmptrapgenerator.py.in +++ b/plugins/hostsnmptrapgenerator.py.in @@ -1,6 +1,6 @@ #!/usr/bin/python # hostsnmptrapgenerator.py.in -- nagios plugin for generating the -#SNMP traps on host status change +# SNMP traps on host status change # Copyright (C) 2014 Red Hat Inc # # This program is free software; you can redistribute it and/or @@ -85,19 +85,19 @@ def parse_input(): def formatargs(args): - #convert nHostNotifyType to enum value + # convert nHostNotifyType to enum value hostnotifytype = {'problem': '0', 'recovery': '1', 'acknowledgement': '2', 'flappingstart': '3', 'flappingstop': '4'} args.nHostNotifyType = hostnotifytype[args.nHostNotifyType.lower()] - #convert nHostStateType to enum value + # convert nHostStateType to enum value hoststatetype = {'hard': '0', 'soft': '1'} args.nHostStateType = hoststatetype[args.nHostStateType.lower()] - #Add quotes to string parameters to handle - #parameters with multiple words separated with - #spaces + # Add quotes to string parameters to handle + # parameters with multiple words separated with + # spaces args.nHostname = '''"''' + args.nHostname + '''"''' args.nHostGroupName = '''"''' + args.nHostGroupName + '''"''' args.nHostOutput = '''"''' + args.nHostOutput + '''"''' |