Merge branch 'deprecation' into combined

This commit is contained in:
Vishvananda Ishaya 2010-06-11 14:07:04 -07:00
commit a53546aa6b
1 changed files with 11 additions and 6 deletions

View File

@ -151,6 +151,11 @@ def getProcessOutput(executable, args=None, env=None, path=None, reactor=None,
d = defer.Deferred()
p = BackRelayWithInput(
d, startedDeferred=startedDeferred, error_ok=error_ok, input=input)
# VISH: commands come in as unicode, but self.executes needs
# strings or process.spawn raises a deprecation warning
executable = str(executable)
if not args is None:
args = [str(x) for x in args]
reactor.spawnProcess(p, executable, (executable,)+tuple(args), env, path)
return d