summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-21 04:35:53 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-21 04:35:53 +0000
commit02062968635f3ecf01b956617cc1e9833348da28 (patch)
treec10d688db3caf09d7b06021df762ad36863f09a2
parentcb6e64ebb7827bea18abbc05a6dba839047fa651 (diff)
downloadportage-02062968635f3ecf01b956617cc1e9833348da28.tar.gz
portage-02062968635f3ecf01b956617cc1e9833348da28.tar.bz2
portage-02062968635f3ecf01b956617cc1e9833348da28.zip
Raise a CommandNotFound exception when necessary, to ease troubleshooting. Thanks to marienz for reporting.
svn path=/main/trunk/; revision=6021
-rw-r--r--pym/portage/process.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage/process.py b/pym/portage/process.py
index 20b1d705c..dfc106e6b 100644
--- a/pym/portage/process.py
+++ b/pym/portage/process.py
@@ -9,7 +9,7 @@ import portage.data
from portage.util import dump_traceback
from portage.const import BASH_BINARY, SANDBOX_BINARY
-
+from portage.exception import CommandNotFound
try:
import resource
@@ -157,7 +157,7 @@ def spawn(mycommand, env={}, opt_name=None, fd_pipes=None, returnpid=False,
or not os.access(binary, os.X_OK)):
binary = path_lookup and find_binary(binary) or None
if not binary:
- return -1
+ raise CommandNotFound(mycommand[0])
# If we haven't been told what file descriptors to use
# default to propogating our stdin, stdout and stderr.