Skip to content

Commit e02df1b

Browse files
authored
Update config_manager.py
1 parent fb2759a commit e02df1b

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

source-code/config_manager.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ def __init__(self):
1717
os.makedirs(self.protons_dir, exist_ok=True)
1818
os.makedirs(self.logs_dir, exist_ok=True)
1919
self.setup_logging()
20-
self.settings = self.load_settings()
20+
self.settings = self.load_settings() # Store settings in instance variable
2121

2222
def setup_logging(self):
2323
logging.basicConfig(
2424
filename=os.path.join(self.logs_dir, 'launcher.log'),
25-
level=logging.DEBUG,
25+
level=logging.DEBUG, # Changed to DEBUG for more details
2626
format='%(asctime)s [%(levelname)s] %(message)s'
2727
)
2828

@@ -38,7 +38,7 @@ def load_games(self):
3838
return games
3939
except (json.JSONDecodeError, IOError, ValueError) as e:
4040
logging.error(f"Error loading games.json: {e}")
41-
print(f"Error loading games.json: {e}")
41+
print(f"Error loading games.json: {e}") # Add console output
4242
return []
4343
return []
4444

@@ -65,10 +65,9 @@ def load_settings(self):
6565
default_settings.update(settings)
6666
except (json.JSONDecodeError, IOError, ValueError) as e:
6767
logging.error(f"Error loading settings.json: {e}")
68-
print(f"Error loading settings.json: {e}")
68+
print(f"Error loading settings.json: {e}") # Add console output
6969
return default_settings
7070

7171
def save_settings(self, settings):
7272
with open(self.settings_file, 'w') as f:
7373
json.dump(settings, f, indent=4)
74-

0 commit comments

Comments
 (0)