]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
always raise exit after handling an exception 232/head
authorAlfredo Deza <alfredo.deza@inktank.com>
Tue, 19 Aug 2014 19:39:09 +0000 (15:39 -0400)
committerAlfredo Deza <alfredo.deza@inktank.com>
Tue, 19 Aug 2014 19:39:27 +0000 (15:39 -0400)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/util/decorators.py

index 47664e7c8716a40ae8096fc935d95f45d92370b9..70e002a6fa09f87b0cb8947de9d438c9d76c21cb 100644 (file)
@@ -72,6 +72,7 @@ def catches(catch=None, handler=None, exit=True, handle_all=False):
                     return handler(e)
                 else:
                     logger.error(make_exception_message(e))
+
                     if exit:
                         exit_from_catch = True
                         sys.exit(1)
@@ -80,12 +81,14 @@ def catches(catch=None, handler=None, exit=True, handle_all=False):
                     raise
                 # Make sure we don't spit double tracebacks if we are raising
                 # SystemExit from the `except catch` block
+
                 if exit_from_catch:
                     sys.exit(1)
 
                 str_failure = traceback.format_exc()
                 for line in str_failure.split('\n'):
                     logger.error("%s" % line)
+                sys.exit(1)
 
         return newfunc