chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'proposed' of git://github.com/gustavh/stgit
[stgit]
/
stgit
/
run.py
diff --git
a/stgit/run.py
b/stgit/run.py
index 7493ed321f094198a36ceb1e225d95bf6b020a5e..2d8ed348b67883f19f050ce89aa8347b417e2e2a 100644
(file)
--- a/
stgit/run.py
+++ b/
stgit/run.py
@@
-110,7
+110,11
@@
class Run:
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
stdin = subprocess.PIPE,
stdout = subprocess.PIPE,
stderr = subprocess.PIPE)
- outdata, errdata = p.communicate(self.__indata)
+ # TODO: only use communicate() once support for Python 2.4 is
+ # dropped (write() needed because of performance reasons)
+ if self.__indata:
+ p.stdin.write(self.__indata)
+ outdata, errdata = p.communicate()
self.exitcode = p.returncode
except OSError, e:
raise self.exc('%s failed: %s' % (self.__cmd[0], e))
self.exitcode = p.returncode
except OSError, e:
raise self.exc('%s failed: %s' % (self.__cmd[0], e))