Browse Source

downloaders.py: PipeReader now works only with 'str' types

PipeReader now works only with 'str' types and it's the callers
responsibility to convert 'str' -> 'unicode' if he has to.

Related to: #244
doc-issue-template
MrS0m30n3 7 years ago
parent
commit
72cef81e1a
1 changed files with 5 additions and 1 deletions
  1. 6
      youtube_dl_gui/downloaders.py

6
youtube_dl_gui/downloaders.py

@ -36,6 +36,10 @@ class PipeReader(Thread):
Args:
queue (Queue.Queue): Python queue to store the output of the subprocess.
Warnings:
All the operations are based on 'str' types. The caller has to convert
the queued items back to 'unicode' if he needs to.
"""
WAIT_TIME = 0.1
@ -54,7 +58,7 @@ class PipeReader(Thread):
while self._running:
if self._filedescriptor is not None:
for line in iter(self._filedescriptor.readline, ''):
for line in iter(self._filedescriptor.readline, str('')):
# Ignore ffmpeg stderr
if str('ffmpeg version') in line:
ignore_line = True

Loading…
Cancel
Save