Ensure pipe is not None

fixes #105
This commit is contained in:
Puyodead1 2022-02-19 10:25:37 -05:00 committed by GitHub
parent c22fbfccaa
commit e5d5285bf7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -52,6 +52,7 @@ is_subscription_course = False
# from https://stackoverflow.com/a/21978778/9785713
def log_subprocess_output(prefix: str, pipe: IO[bytes]):
if pipe:
for line in iter(pipe.readline, b''): # b'\n'-separated lines
logger.debug('[%s]: %r', prefix, line.decode("utf8").strip())