Changed the 'pipe' utility to work with commands taking input

on standard in, also when providing an emtpy string as input.
This is now different from providing 'None' as the input
argument, or omitting it.
 - Legacy-Id: 6485
This commit is contained in:
Henrik Levkowetz 2013-10-23 20:45:07 +00:00
parent 3863b0def3
commit e27e4dbb1f

View file

@ -9,7 +9,7 @@ def pipe(cmd, str=None):
bufsize = len(str)
pipe = Popen(cmd, True, bufsize)
if str:
if not str is None:
pipe.tochild.write(str)
pipe.tochild.close()