summaryrefslogtreecommitdiffstats
path: root/ipaserver/install/service.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2014-09-26 12:43:18 +0200
committerMartin Kosek <mkosek@redhat.com>2014-09-26 16:55:54 +0200
commitf86618623964f9a97244ce08117c575b200a34af (patch)
tree7c0a1af8ed4f010efca01e763a0505ec3cc5a88e /ipaserver/install/service.py
parent89c4f1242558d725a1771dce444df5737e49289e (diff)
downloadfreeipa-f86618623964f9a97244ce08117c575b200a34af.tar.gz
freeipa-f86618623964f9a97244ce08117c575b200a34af.tar.xz
freeipa-f86618623964f9a97244ce08117c575b200a34af.zip
ipaserver.install.service: Don't show error message on SystemExit(0)
Additional fix for: https://fedorahosted.org/freeipa/ticket/4499 Reviewed-By: Martin Kosek <mkosek@redhat.com>
Diffstat (limited to 'ipaserver/install/service.py')
-rw-r--r--ipaserver/install/service.py17
1 files changed, 9 insertions, 8 deletions
diff --git a/ipaserver/install/service.py b/ipaserver/install/service.py
index d095fe041..d2556dccc 100644
--- a/ipaserver/install/service.py
+++ b/ipaserver/install/service.py
@@ -370,14 +370,15 @@ class Service(object):
run_step(full_msg, method)
step += 1
except BaseException as e:
- # show the traceback, so it's not lost if the cleanup method fails
- root_logger.debug("%s" % traceback.format_exc())
- self.print_msg(' [error] %s: %s' % (type(e).__name__, e))
-
- # run through remaining methods marked run_after_failure
- for message, method, run_after_failure in steps_iter:
- if run_after_failure:
- run_step(" [cleanup]: %s" % message, method)
+ if not (isinstance(e, SystemExit) and e.code == 0):
+ # show the traceback, so it's not lost if cleanup method fails
+ root_logger.debug("%s" % traceback.format_exc())
+ self.print_msg(' [error] %s: %s' % (type(e).__name__, e))
+
+ # run through remaining methods marked run_after_failure
+ for message, method, run_after_failure in steps_iter:
+ if run_after_failure:
+ run_step(" [cleanup]: %s" % message, method)
raise