[vk] Update test
[youtube-dl] / youtube_dl / utils.py
index a3a7226d8761eb3a44e10ffeba28b350bc120d84..1036ea9bd87789bca51e8cbc2b8091e7b5f96bc3 100644 (file)
@@ -926,7 +926,11 @@ def _windows_write_string(s, out):
         2: -12,
     }
 
-    fileno = out.fileno()
+    try:
+        fileno = out.fileno()
+    except AttributeError:
+        # If the output stream doesn't have a fileno, it's virtual
+        return False
     if fileno not in WIN_OUTPUT_IDS:
         return False
 
@@ -1423,3 +1427,5 @@ def qualities(quality_ids):
             return -1
     return q
 
+
+DEFAULT_OUTTMPL = '%(title)s-%(id)s.%(ext)s'