From c2333fdd521f5bbd4c48807d31f2c7ebf8e97566 Mon Sep 17 00:00:00 2001 From: Aaron Angert Date: Sun, 29 May 2022 17:29:49 -0900 Subject: [PATCH] fixed saving settings --- piparty.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/piparty.py b/piparty.py index b46ebef5..92df3447 100644 --- a/piparty.py +++ b/piparty.py @@ -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(): @@ -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({