packaging: fix the constructor of FakePopen

packaging.util requires the env keyword.
This commit is contained in:
Victor Stinner 2011-05-20 00:12:10 +02:00
parent 8914fed842
commit f966803c08
1 changed files with 8 additions and 2 deletions

View File

@ -56,8 +56,14 @@ password:xxx
class FakePopen: class FakePopen:
test_class = None test_class = None
def __init__(self, cmd, shell, stdout, stderr): def __init__(self, args, bufsize=0, executable=None,
self.cmd = cmd.split()[0] stdin=None, stdout=None, stderr=None,
preexec_fn=None, close_fds=False,
shell=False, cwd=None, env=None, universal_newlines=False,
startupinfo=None, creationflags=0,
restore_signals=True, start_new_session=False,
pass_fds=()):
self.cmd = args.split()[0]
exes = self.test_class._exes exes = self.test_class._exes
if self.cmd not in exes: if self.cmd not in exes:
# we don't want to call the system, returning an empty # we don't want to call the system, returning an empty