From: Philipp Hagemeister Date: Fri, 23 Jan 2015 11:17:12 +0000 (+0100) Subject: [utils] Catch strange Windows errors (Closes #4733) X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=aa42e87340e491d0b151e9dad368711fc275c7b9;p=youtube-dl [utils] Catch strange Windows errors (Closes #4733) --- diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py index 4be323926..463cc20ff 100644 --- a/youtube_dl/utils.py +++ b/youtube_dl/utils.py @@ -863,6 +863,9 @@ def _windows_write_string(s, out): except AttributeError: # If the output stream doesn't have a fileno, it's virtual return False + except io.UnsupportedOperation: + # Some strange Windows pseudo files? + return False if fileno not in WIN_OUTPUT_IDS: return False