From 2cd6b250355d795f87c6d05487b5983900617b1a Mon Sep 17 00:00:00 2001 From: Marc Abramowitz Date: Thu, 3 Apr 2014 14:39:22 -0700 Subject: Log more info when catch OSError while doing a popen Fixes: https://bitbucket.org/hpk42/tox/issue/164/if-install_command-raises-an-oserror-get-a --- tox/_cmdline.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tox/_cmdline.py b/tox/_cmdline.py index 7c6cd69..04296c4 100644 --- a/tox/_cmdline.py +++ b/tox/_cmdline.py @@ -93,8 +93,13 @@ class Action(object): if cwd is None: # XXX cwd = self.session.config.cwd cwd = py.path.local() - popen = self._popen(args, cwd, env=env, - stdout=f, stderr=STDOUT) + try: + popen = self._popen(args, cwd, env=env, + stdout=f, stderr=STDOUT) + except OSError: + self.report.error("invocation failed, args: %s, cwd: %s" % + (args, cwd)) + raise popen.outpath = outpath popen.args = [str(x) for x in args] popen.cwd = cwd -- cgit v1.2.1