summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Abramowitz <marc@marc-abramowitz.com>2014-04-03 14:39:22 -0700
committerMarc Abramowitz <marc@marc-abramowitz.com>2014-04-03 14:39:22 -0700
commit2cd6b250355d795f87c6d05487b5983900617b1a (patch)
tree92892f54263d9a82efc0e16cf5cff3c5f91ba5c1
parentcb12ef1863bfeaab64857117ea7c993898482a39 (diff)
downloadtox-2cd6b250355d795f87c6d05487b5983900617b1a.tar.gz
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
-rw-r--r--tox/_cmdline.py9
1 files 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