浏览代码

[utils] Catch strange Windows errors (Closes #4733)

Philipp Hagemeister 10 年之前
父节点
当前提交
aa42e87340
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      youtube_dl/utils.py

+ 3 - 0
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