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
This commit is contained in:
Erik M. Bray 2013-04-09 15:20:19 +00:00
parent ba33408cb5
commit d1d4f9c234
1 changed files with 2 additions and 0 deletions

View File

@ -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' %