projects
/
youtube-dl
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acd6958
)
[utils/_windows_write_string] Be defensive about fileno (Fixes #2820)
author
Philipp Hagemeister
<phihag@phihag.de>
Wed, 30 Apr 2014 08:07:32 +0000
(10:07 +0200)
committer
Philipp Hagemeister
<phihag@phihag.de>
Wed, 30 Apr 2014 08:07:32 +0000
(10:07 +0200)
youtube_dl/utils.py
patch
|
blob
|
history
diff --git
a/youtube_dl/utils.py
b/youtube_dl/utils.py
index 2a93d3e34a13d473c9438dced5a3051338325708..1036ea9bd87789bca51e8cbc2b8091e7b5f96bc3 100644
(file)
--- a/
youtube_dl/utils.py
+++ b/
youtube_dl/utils.py
@@
-926,7
+926,11
@@
def _windows_write_string(s, out):
2: -12,
}
- fileno = out.fileno()
+ try:
+ fileno = out.fileno()
+ except AttributeError:
+ # If the output stream doesn't have a fileno, it's virtual
+ return False
if fileno not in WIN_OUTPUT_IDS:
return False