python: netcmd: remove OptionError alias to OptionValueError
commitfb058e7f2ce3878713af959e8e35d1991bde24ee
authorRob van der Linde <rob@catalyst.net.nz>
Thu, 5 Oct 2023 23:45:35 +0000 (6 12:45 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 24 Oct 2023 23:31:29 +0000 (24 23:31 +0000)
treeb07285e56fdb565e0663f94bfe714ccb1a14302c
parent14b2129868748d3732d5361e2b34f3a5a0a66ff2
python: netcmd: remove OptionError alias to OptionValueError

The other methods in this file already raise optparse.OptionValueError
directly, except for two older ones.

They are using an alias which changes the name to OptionError, the
confusing part about this is that optparse.OptionError actually does
exist, so the incorrect alias needs to be removed.

Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/getopt.py