Procházet zdrojové kódy

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

Philipp Hagemeister před 11 roky
rodič
revize
aa42e87340
1 změnil soubory, kde provedl 3 přidání a 0 odebrání
  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