diff --git a/youtube_dl/options.py b/youtube_dl/options.py
index 99ce4131fd..c9033e3cb2 100644
--- a/youtube_dl/options.py
+++ b/youtube_dl/options.py
@@ -26,9 +26,7 @@ def parseOpts(overrideArguments=None):
         except IOError:
             return default  # silently skip if file is not present
         try:
-            res = []
-            for l in optionf:
-                res += compat_shlex_split(l, comments=True)
+            res = compat_shlex_split(optionf.read(), comments=True)
         finally:
             optionf.close()
         return res