Fix type error

cloud-build.py:173: error: Item "None" of "Optional[IO[bytes]]" has no
attribute "read"
This commit is contained in:
Mikhail Gordeev 2020-04-06 23:15:16 +03:00
parent 7206de1f74
commit fea0fcf876

View File

@ -170,6 +170,7 @@ class CB:
rc = p.wait()
maybe_fail(string, rc)
with open(stdout_to_file, 'w') as f:
if p.stdout:
f.write(p.stdout.read().decode())
else:
rc = subprocess.call(cmd)