Show a traceback when spawn() fails.
authorZac Medico <zmedico@gentoo.org>
Wed, 12 Aug 2009 00:19:32 +0000 (00:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Wed, 12 Aug 2009 00:19:32 +0000 (00:19 -0000)
svn path=/main/trunk/; revision=14005

pym/portage/process.py

index 051a59f618fb1c6d3bb948c2148331d0b7fb0033..5dcf481e2c437dce936dbb90965cb53305423357 100644 (file)
@@ -8,6 +8,7 @@ import os
 import atexit
 import signal
 import sys
+import traceback
 
 import portage
 portage.proxy.lazyimport.lazyimport(globals(),
@@ -244,6 +245,7 @@ def spawn(mycommand, env={}, opt_name=None, fd_pipes=None, returnpid=False,
                        # propogate out of this function and cause exiting
                        # with anything other than os._exit()
                        sys.stderr.write("%s:\n   %s\n" % (e, " ".join(mycommand)))
+                       traceback.print_exc()
                        sys.stderr.flush()
                        os._exit(1)