egeland / nagios-rbl-check

Icinga/Nagios spam blacklist check, written in python
GNU General Public License v3.0
34 stars 18 forks source link

Updated script to use the argparse python module, which prints a slightl... #3

Closed tfhartmann closed 9 years ago

tfhartmann commented 11 years ago

Updated script to use the argparse python module, which prints a slightly nicer example and usage message, and puts some of the logic into the arparse object

This does change the default output when arg's are wrong from exiting 3 To exiting to a '2' state

I would have suggested merging it into a separate branch to check it out, but I wasn't sure how to request that in a Pull request.

egeland commented 11 years ago

Hi Tim,

Thanks for contributing!

The argparse bits look good, but the return code should stay as 3 for bad arguments, as per http://nagiosplug.sourceforge.net/developer-guidelines.html#AEN76 .

I'll merge your argparse change later today, if I can figure out how to keep the 3 return value, so we're following the nagios plugin dev guidelines. :-)

Cheers, Frode

tfhartmann commented 11 years ago

Hey Frode, thats great! I'll take a look also and see if I can come up with something as well.

egeland commented 9 years ago

From memory, I couldn't figure out the return value. Since I've left this PR to linger for a while and it has conflicts now, I'll close it..