Jelajahi Sumber

[options] Accept quoted string across multiple lines (#9940)

Like:

    -f "
    bestvideo+bestaudio/
    best
    "
Jaime Marquínez Ferrándiz 9 tahun lalu
induk
melakukan
9e29ef13a3
1 mengubah file dengan 1 tambahan dan 3 penghapusan
  1. 1 3
      youtube_dl/options.py

+ 1 - 3
youtube_dl/options.py

@@ -26,9 +26,7 @@ def parseOpts(overrideArguments=None):
         except IOError:
         except IOError:
             return default  # silently skip if file is not present
             return default  # silently skip if file is not present
         try:
         try:
-            res = []
-            for l in optionf:
-                res += compat_shlex_split(l, comments=True)
+            res = compat_shlex_split(optionf.read(), comments=True)
         finally:
         finally:
             optionf.close()
             optionf.close()
         return res
         return res