summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorJaime Marquínez Ferrándiz <[email protected]>2013-12-31 13:34:52 +0100
committerJaime Marquínez Ferrándiz <[email protected]>2013-12-31 13:34:52 +0100
commite9f9a10fba9d9c41eb72dc603ef186300bf5f304 (patch)
treefc94289146abde229ba6ea3b2213302952460eb2
parentb26559878fa47bb13ad283fcad36c3a9ef484528 (diff)
downloadyoutube-dl-e9f9a10fba9d9c41eb72dc603ef186300bf5f304.tar.gz
youtube-dl-e9f9a10fba9d9c41eb72dc603ef186300bf5f304.zip
Fix initialization of YoutubeDL with params set to None
Set it to an empty dictionary because it’s directly accessed when setting some properties
-rw-r--r--youtube_dl/YoutubeDL.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/youtube_dl/YoutubeDL.py b/youtube_dl/YoutubeDL.py
index a9a3639d7..738304193 100644
--- a/youtube_dl/YoutubeDL.py
+++ b/youtube_dl/YoutubeDL.py
@@ -164,6 +164,8 @@ class YoutubeDL(object):
def __init__(self, params=None):
"""Create a FileDownloader object with the given options."""
+ if params is None:
+ params = {}
self._ies = []
self._ies_instances = {}
self._pps = []
@@ -172,7 +174,7 @@ class YoutubeDL(object):
self._num_downloads = 0
self._screen_file = [sys.stdout, sys.stderr][params.get('logtostderr', False)]
self._err_file = sys.stderr
- self.params = {} if params is None else params
+ self.params = params
if params.get('bidi_workaround', False):
try: