Skip to content

Commit

Permalink
sync-db: skip source folder when not found
Browse files Browse the repository at this point in the history
  • Loading branch information
avivace committed Jun 4, 2024
1 parent 359b90d commit 156485e
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/sync_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Those should point to the "entries" subfolder of a "Homebrew Hub database"
# e.g.: https://github.com/gbdev/database or https://github.com/gbadev-org/games

basefolder = "db-sources/"
basefolder = "db-sources"

dirs = [
"database-gb/entries",
Expand Down Expand Up @@ -61,7 +61,11 @@ def run():
folder = f"{basefolder}/{database_folder}"
d += 1
print(f"Processing folder {folder}")
games = os.listdir(folder)
try:
games = os.listdir(folder)
except FileNotFoundError:
print("Folder not found, skipping it")
continue

games_count = len(games)
print(f"Found {games_count} games")
Expand Down

0 comments on commit 156485e

Please sign in to comment.