mirror of
https://cdm-project.com/Download-Tools/udemy-downloader.git
synced 2025-04-30 02:34:25 +02:00
fix some issues with subprocess logging
This commit is contained in:
parent
e5398a1333
commit
2ce865a81b
2
main.py
2
main.py
@ -53,7 +53,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
|
||||
for line in iter(lambda: pipe.read(1), ""):
|
||||
logger.debug('[%s]: %r', prefix, line.decode("utf8").strip())
|
||||
pipe.flush()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user