X-Git-Url: http://git.cielonegro.org/gitweb.cgi?a=blobdiff_plain;f=youtube_dl%2Futils.py;h=1036ea9bd87789bca51e8cbc2b8091e7b5f96bc3;hb=7b93c2c204d7bad9285b5c9db12ff2acb01338e6;hp=2a93d3e34a13d473c9438dced5a3051338325708;hpb=acd69589a54d03f60a018a298c74a4c8aef2abc2;p=youtube-dl.git diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 2a93d3e34..1036ea9bd 100644 --- 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