Skip to content

Commit

Permalink
Update NSLGameScanner.py
Browse files Browse the repository at this point in the history
  • Loading branch information
moraroy committed Jun 23, 2024
1 parent e7ba9ef commit 7bb9661
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions NSLGameScanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,14 @@ def write_shortcuts_to_file(shortcuts_file, shortcuts):
try:
shortcuts = vdf.binary_loads(file.read())
except vdf.VDFError as e:
print(f"Error reading file: {e}")
shortcuts = create_empty_shortcuts()
print(f"Error reading file: {e}. The file might be corrupted or unreadable.")
print("Exiting the program. Please check the shortcuts.vdf file.")
sys.exit(1)
else:
print("The shortcuts.vdf file does not exist.")
sys.exit(1)


# Open the config.vdf file
with open(f"{logged_in_home}/.steam/root/config/config.vdf", 'r') as file:
config_data = vdf.load(file)
Expand Down

0 comments on commit 7bb9661

Please sign in to comment.