kiip/pynagios — pull request #7 by saz (2012-09-05 12:39:11+00:00)
Title: import missing OptionValueError from optparse

Expected result:
```
(statsd-nagios-plugin)saz@pc94:~/src/statsd-nagios-plugin$ python check_statsd.py -H test1 -p 8126 -w 300:200
Usage: check_statsd.py [options]
```

check_statsd.py: error: options -w: start must be less than or equal to end

Current result:
```
(statsd-nagios-plugin)saz@pc94:~/src/statsd-nagios-plugin$ python check_statsd.py -H test1 -p 8126 -w 300:200
Traceback (most recent call last):
File "check_statsd.py", line 48, in
StatsdCheck().check().exit()
File "/home/saz/.virtualenvs/statsd-nagios-plugin/local/lib/python2.7/site-packages/pynagios/plugin.py", line 125, in __init__
(self.options, self.args) = self._option_parser.parse_args(args)
File "/usr/lib/python2.7/optparse.py", line 1399, in parse_args
stop = self._process_args(largs, rargs, values)
File "/usr/lib/python2.7/optparse.py", line 1443, in _process_args
self._process_short_opts(rargs, values)
File "/usr/lib/python2.7/optparse.py", line 1550, in _process_short_opts
option.process(opt, value, values, self)
File "/usr/lib/python2.7/optparse.py", line 782, in process
value = self.convert_value(opt, value)
File "/usr/lib/python2.7/optparse.py", line 774, in convert_value
return self.check_value(opt, value)
File "/usr/lib/python2.7/optparse.py", line 769, in check_value
return checker(self, opt, value)
File "/home/saz/.virtualenvs/statsd-nagios-plugin/local/lib/python2.7/site-packages/pynagios/plugin.py", line 28, in check_pynagios_range
raise OptionValueError("options %s: %s" % (opt, e.message))
NameError: global name 'OptionValueError' is not defined
```