Skip to content

Commit

Permalink
Fix bugs in check_gamefixes
Browse files Browse the repository at this point in the history
- Fix not terminating outer loop when app ids are empty and the __init__.py file being included in the set when validating GOG app ids
  • Loading branch information
R1kaB3rN committed Aug 4, 2024
1 parent 7c8d94d commit e3d0141
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/check_gamefixes.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,9 @@ def check_steamfixes(project: Path, url: str, api: ApiEndpoint) -> None:
if prefix == f'{appid}.success' and isinstance(value, bool) and value:
appids.remove(appid)
break
if not appids:
break

if not appids:
break

r.read()

Expand Down Expand Up @@ -135,6 +136,8 @@ def _batch_generator(gamefix: Path, size=50) -> Generator[set[str], Any, Any]:

# Process only umu-* app ids
for file in gamefix.glob('*'):
if not file.name.startswith('umu-'):
continue
appid = file.name.removeprefix('umu-').removesuffix('.py')
appids.add(appid)
if count == size:
Expand Down

0 comments on commit e3d0141

Please sign in to comment.