summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-02-21 04:37:32 +0000
committerZac Medico <zmedico@gentoo.org>2007-02-21 04:37:32 +0000
commit66bed96a8b99a8c0150768c2150a0310059c4a83 (patch)
tree1dbf04ce1817f89f44e019dc6d640afebf3c0e12 /pym
parentf9821525540f6ce0e47d2cfcc0454a1ff9c6dba5 (diff)
downloadportage-66bed96a8b99a8c0150768c2150a0310059c4a83.tar.gz
portage-66bed96a8b99a8c0150768c2150a0310059c4a83.tar.bz2
portage-66bed96a8b99a8c0150768c2150a0310059c4a83.zip
Raise a CommandNotFound exception when necessary, to ease troubleshooting. Thanks to marienz for reporting. (trunk r6020:6021)
svn path=/main/branches/2.1.2/; revision=6022
Diffstat (limited to 'pym')
-rw-r--r--pym/portage_exec.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/pym/portage_exec.py b/pym/portage_exec.py
index 252fed2a0..800535f55 100644
--- a/pym/portage_exec.py
+++ b/pym/portage_exec.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.