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:
parent
526c6bbdbe
commit
d69244d39c
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user