applied patch for shell test by Toshio Kuramoti

This commit is contained in:
jan.dittberner 2008-07-04 19:13:14 +00:00
parent b37afa2b6e
commit 8b69e22ee0

View File

@ -12,7 +12,15 @@ class Shell(Pathed):
return command
# Redirect stderr to stdout
# This is a bit of a hack, but I've not found a better way
py_path = os.environ.get('PYTHONPATH', '')
py_path_list = py_path.split(':')
py_path_list.append(os.path.abspath('.'))
os.environ['PYTHONPATH'] = ':'.join(py_path_list)
fd=os.popen(command+' 2>&1',*p,**k)
if py_path:
py_path = os.environ['PYTHONPATH'] = py_path
else:
del os.environ['PYTHONPATH']
return fd
def output_and_exitcode(self,*p,**k):
fd=self.execute(*p,**k)