Use set class instead of dictview class as set is wider supported

This commit is contained in:
Alexander Bokovoy 2011-10-14 17:40:26 +03:00 committed by Rob Crittenden
parent f4ec8a2fa4
commit 447ce62966

View File

@ -1244,8 +1244,8 @@ $)''', re.VERBOSE)
# Now add all options from replacevars and appendvars that were not found in the file
new_vars = replacevars.copy()
new_vars.update(appendvars)
newvars_view = new_vars.viewkeys() - old_values.viewkeys()
append_view = (appendvars.viewkeys() - replacevars.viewkeys()) - old_values.viewkeys()
newvars_view = set(new_vars.keys()) - set(old_values.keys())
append_view = (set(appendvars.keys()) - set(replacevars.keys())) - set(old_values.keys())
for item in newvars_view:
new_config.write("%s=%s\n" % (item,new_vars[item]))
for item in append_view: