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))