Python 3 compatibility.

This commit is contained in:
Anthony Sottile
2014-04-12 18:19:57 -07:00
parent ddebb83a40
commit bb365a6e68
10 changed files with 30 additions and 27 deletions

View File

@@ -55,6 +55,9 @@ class PrefixedCommandRunner(object):
'stdout': subprocess.PIPE,
'stderr': subprocess.PIPE,
}
if stdin is not None:
stdin = stdin.encode('utf-8')
popen_kwargs.update(kwargs)
self._create_path_if_not_exists()
replaced_cmd = _replace_cmd(cmd, prefix=self.prefix_dir)