From d1d4f9c2344d1efe655c9068774fcf7cb42bd053 Mon Sep 17 00:00:00 2001 From: "Erik M. Bray" Date: Tue, 9 Apr 2013 15:20:19 +0000 Subject: [PATCH] When catching exceptions from a setup-hook don't throw a traceback up for sys.exit() git-svn-id: https://svn.stsci.edu/svn/ssb/stsci_python/d2to1/trunk@24204 fe389314-cf27-0410-b35b-8c050e845b92 --- pbr/d2to1/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pbr/d2to1/util.py b/pbr/d2to1/util.py index ab38d66b..8ffd8069 100644 --- a/pbr/d2to1/util.py +++ b/pbr/d2to1/util.py @@ -180,6 +180,8 @@ def cfg_to_args(path='setup.cfg'): hook_fn = resolve_name(hook) try : hook_fn(config) + except SystemExit: + log.error('setup hook %s terminated the installation') except: e = sys.exc_info()[1] log.error('setup hook %s raised exception: %s\n' %