Fix type error
cloud-build.py:173: error: Item "None" of "Optional[IO[bytes]]" has no attribute "read"
This commit is contained in:
parent
7206de1f74
commit
fea0fcf876
@ -170,7 +170,8 @@ class CB:
|
|||||||
rc = p.wait()
|
rc = p.wait()
|
||||||
maybe_fail(string, rc)
|
maybe_fail(string, rc)
|
||||||
with open(stdout_to_file, 'w') as f:
|
with open(stdout_to_file, 'w') as f:
|
||||||
f.write(p.stdout.read().decode())
|
if p.stdout:
|
||||||
|
f.write(p.stdout.read().decode())
|
||||||
else:
|
else:
|
||||||
rc = subprocess.call(cmd)
|
rc = subprocess.call(cmd)
|
||||||
maybe_fail(string, rc)
|
maybe_fail(string, rc)
|
||||||
|
Loading…
Reference in New Issue
Block a user