From 99ff7c741b2b8c837e651f221ec4c0d8b47513fa Mon Sep 17 00:00:00 2001 From: Philip Sargent Date: Sat, 5 Aug 2023 18:54:20 +0300 Subject: [PATCH] bug fix for server --- parsers/caves.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/parsers/caves.py b/parsers/caves.py index 8e2abaffb..4e720db43 100644 --- a/parsers/caves.py +++ b/parsers/caves.py @@ -730,11 +730,14 @@ def read_cave(filename, cave=None): def add_cave_to_pending_list(id): fpending = Path(CAVEDESCRIPTIONS, "pendingcaves.txt") - if settings.DBSWITCH == "sqlite": # dev machine only - if fpending.is_file(): - with open(fpending, "a") as pend: - pend.write(f"{id}\n") - # now need to do the git commit thing if running on server. + try: + if settings.DBSWITCH == "sqlite": # dev machine only + if fpending.is_file(): + with open(fpending, "a") as pend: + pend.write(f"{id}\n") + # now need to do the git commit thing if running on server. + except: + pass def readcaves(): """Called from databaseReset mass importer.