summaryrefslogtreecommitdiff
path: root/source4/scripting/python
diff options
context:
space:
mode:
Diffstat (limited to 'source4/scripting/python')
-rw-r--r--source4/scripting/python/samba/getopt.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/source4/scripting/python/samba/getopt.py b/source4/scripting/python/samba/getopt.py
index c7035c1936..14cfba6241 100644
--- a/source4/scripting/python/samba/getopt.py
+++ b/source4/scripting/python/samba/getopt.py
@@ -75,8 +75,7 @@ class SambaOptions(optparse.OptionGroup):
def _set_option(self, option, opt_str, arg, parser):
if arg.find('=') == -1:
- print("--option takes a 'a=b' argument")
- sys.exit(1)
+ raise optparse.OptionValueError("--option option takes a 'a=b' argument")
a = arg.split('=')
self._lp.set(a[0], a[1])