handle case for no Popen.stdin

Similar to the previous commit (cb0f828)
This commit is contained in:
deeplow 2022-07-21 13:48:53 +01:00
parent f99131e30c
commit c69f228261
No known key found for this signature in database
GPG key ID: 577982871529A52A

View file

@ -447,7 +447,8 @@ class GlobalCommon(object):
while True: while True:
chunk = f.read(chunk_size) chunk = f.read(chunk_size)
if len(chunk) > 0: if len(chunk) > 0:
p.stdin.write(chunk) if p.stdin:
p.stdin.write(chunk)
else: else:
break break
p.communicate() p.communicate()