1
0
mirror of https://github.com/spaam/svtplay-dl.git synced 2024-11-27 13:44:14 +01:00

merge: dont try to merge when new is None

This commit is contained in:
Johan Andersson 2018-05-26 01:26:30 +02:00
parent 526c6bbdbe
commit d69244d39c

View File

@ -246,12 +246,13 @@ def merge(old, new):
if isinstance(new, list):
new = {list(i.keys())[0]: i[list(i.keys())[0]] for i in new}
config = setup_defaults()
for item in new:
if item in new:
if new[item] != config.get(item): # Check if new value is not a default one.
if new:
for item in new:
if item in new:
if new[item] != config.get(item): # Check if new value is not a default one.
old[item] = new[item]
else:
old[item] = new[item]
else:
old[item] = new[item]
options = Options()
options.set_variable(old)
return options