From aa42e87340e491d0b151e9dad368711fc275c7b9 Mon Sep 17 00:00:00 2001 From: Philipp Hagemeister Date: Fri, 23 Jan 2015 12:17:12 +0100 Subject: [PATCH] [utils] Catch strange Windows errors (Closes #4733) --- youtube_dl/utils.py | 3 +++ 1 file changed, 3 insertions(+) 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