status zero.
"""
kid = SUB.Popen(command, stdout = SUB.PIPE)
- out = kid.stdout.readline()
- junk = kid.stdout.read()
+ try:
+ out = kid.stdout.readline()
+ junk = kid.stdout.read()
+ finally:
+ kid.stdout.close()
if junk != '': raise ValueError \
("Child process `%s' produced unspected output %r" % (command, junk))
rc = kid.wait()