aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/utils.py
diff options
context:
space:
mode:
authorremitamine <remitamine@gmail.com>2015-10-31 19:36:04 +0100
committerremitamine <remitamine@gmail.com>2015-10-31 19:36:04 +0100
commit9550ca506fccf9c9d795816cc0a7817ff262ef45 (patch)
tree7b50bcf00d5badf5001c029de0de029818c88cc1 /youtube_dl/utils.py
parentc01e1a96aa964ef6d5f0bf7675dbe34096b1d2c8 (diff)
[utils] change extract_attributes to work in python 2
Diffstat (limited to 'youtube_dl/utils.py')
-rw-r--r--youtube_dl/utils.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/utils.py b/youtube_dl/utils.py
index bcebf9cc5..518cea98b 100644
--- a/youtube_dl/utils.py
+++ b/youtube_dl/utils.py
@@ -252,7 +252,8 @@ def extract_attributes(attributes_str, attributes_regex=r'(?s)\s*([^\s=]+)\s*=\s
attributes = re.findall(attributes_regex, attributes_str)
attributes_dict = {}
if attributes:
- attributes_dict = {attribute_name: attribute_value for (attribute_name, attribute_value) in attributes}
+ for (attribute_name, attribute_value) in attributes:
+ attributes_dict[attribute_name] = attribute_value
return attributes_dict