From ea0ecf4fb4df01accf121dc3e1905763dce3c764 Mon Sep 17 00:00:00 2001 From: kramo <93832451+kra-mo@users.noreply.github.com> Date: Mon, 19 Jun 2023 19:52:51 +0200 Subject: [PATCH] Fix bottles import if no thumbnail - fixes #113 --- src/importers/bottles_importer.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/importers/bottles_importer.py b/src/importers/bottles_importer.py index a8e9699..6c32910 100644 --- a/src/importers/bottles_importer.py +++ b/src/importers/bottles_importer.py @@ -94,12 +94,13 @@ def bottles_importer(): except (FileNotFoundError, KeyError): bottles_location = bottles_dir / "bottles" - grid_path = ( - bottles_location - / game["bottle"]["path"] - / "grids" - / game["thumbnail"].split(":")[1] - ) + if game["thumbnail"]: + grid_path = ( + bottles_location + / game["bottle"]["path"] + / "grids" + / game["thumbnail"].split(":")[1] + ) importer.save_game( values,