Skip to content

Commit

Permalink
fixed saving settings
Browse files Browse the repository at this point in the history
  • Loading branch information
adangert committed May 30, 2022
1 parent 1905341 commit c2333fd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions piparty.py
Original file line number Diff line number Diff line change
Expand Up @@ -775,8 +775,10 @@ def initialize_settings(self):
})
try:
#if anything fails during the settings file load, ignore file and stick with defaults
print("loading settings")
with open(common.SETTINGSFILE,'r') as yaml_file:
file_settings = yaml.load(yaml_file)
file_settings = yaml.safe_load(yaml_file)
print(file_settings)

temp_colors = file_settings['color_lock_choices']
for key in temp_colors.keys():
Expand All @@ -800,8 +802,9 @@ def initialize_settings(self):
temp_settings.update(file_settings)
temp_settings['color_lock_choices'] = temp_colors

except:
except Exception as e:
print("we found an exception when loading the settings!")
print(e)

#force these settings
temp_settings.update({
Expand Down

0 comments on commit c2333fd

Please sign in to comment.