Skip to content

Commit

Permalink
Fix bug when passing a non-numeric GAMEID
Browse files Browse the repository at this point in the history
- Fixes a critical bug that would prevent proton fixes to be applied when the GAMEID is non-numeric (e.g., umu-default). An UnboundLocalError would occur in the boolean expression 'store != steam' because the store variable wouldn't be created when the previous branches were not satisfied
  • Loading branch information
R1kaB3rN committed Apr 15, 2024
1 parent a1309e3 commit af7243b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions fix.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,7 @@ def get_store_name(store: str) -> str:
def get_module_name(game_id: str, default: bool = False, local: bool = False) -> str:
""" Creates the name of a gamefix module, which can be imported
"""
if os.environ.get('STORE'):
store = os.environ['STORE'].lower()
elif game_id.isnumeric():
store = 'steam'
store = os.environ.get('STORE').lower() if os.environ.get('STORE') else 'steam'

if store != 'steam':
log.info(f'Non-steam game {get_game_name()} ({game_id})')
Expand Down

0 comments on commit af7243b

Please sign in to comment.