Fixes clobbering of 'path' argument.

This commit is contained in:
lagos 2012-09-27 16:50:11 -07:00
parent bc4783efac
commit 5e8f077eb5

View file

@ -278,8 +278,8 @@ def spawnProcess(processProtocol, bootstrap, args=(), env={},
pythonpath = []
for pkg in packages:
path, name = os.path.split(pkg)
p = os.path.split(imp.find_module(name, [path] if path else None)[1])[0]
pkg_path, name = os.path.split(pkg)
p = os.path.split(imp.find_module(name, [pkg_path] if pkg_path else None)[1])[0]
if p.startswith(os.path.join(sys.prefix, 'lib')):
continue
pythonpath.append(p)