[utils] Catch strange Windows errors (Closes #4733)
authorPhilipp Hagemeister <phihag@phihag.de>
Fri, 23 Jan 2015 11:17:12 +0000 (12:17 +0100)
committerPhilipp Hagemeister <phihag@phihag.de>
Fri, 23 Jan 2015 11:17:12 +0000 (12:17 +0100)
youtube_dl/utils.py

index 4be3239268fd66e11bce4c2efd1cb26565e60883..463cc20ff7622d13c782f97882d75952e53e3d09 100644 (file)
@@ -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