summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xinstall/tools/ipactl10
-rw-r--r--ipapython/admintool.py4
2 files changed, 8 insertions, 6 deletions
diff --git a/install/tools/ipactl b/install/tools/ipactl
index e173d10c1..d4b2c0878 100755
--- a/install/tools/ipactl
+++ b/install/tools/ipactl
@@ -186,9 +186,9 @@ def ipa_start(options):
pass
if isinstance(e, IpactlError):
# do not display any other error message
- raise IpactlError(None, e.rval)
+ raise IpactlError(rval=e.rval)
else:
- raise IpactlError(None)
+ raise IpactlError()
if len(svc_list) == 0:
# no service to stop
@@ -235,7 +235,7 @@ def ipa_stop(options):
# just try to stop it, do not read a result
dirsrv.stop()
finally:
- raise IpactlError(None)
+ raise IpactlError()
if len(svc_list) == 0:
# no service to stop
@@ -277,9 +277,9 @@ def ipa_restart(options):
pass
if isinstance(e, IpactlError):
# do not display any other error message
- raise IpactlError(None, e.rval)
+ raise IpactlError(rval=e.rval)
else:
- raise IpactlError(None)
+ raise IpactlError()
if len(svc_list) == 0:
# no service to stop
diff --git a/ipapython/admintool.py b/ipapython/admintool.py
index 1ba8b6bbb..b644516dd 100644
--- a/ipapython/admintool.py
+++ b/ipapython/admintool.py
@@ -36,11 +36,13 @@ class ScriptError(StandardError):
"""An exception that records an error message and a return value
"""
def __init__(self, msg='', rval=1):
+ if msg is None:
+ msg = ''
self.msg = msg
self.rval = rval
def __str__(self):
- return self.msg or ''
+ return self.msg
class AdminTool(object):