summaryrefslogtreecommitdiffstats
path: root/parsers/caves.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-08-05 18:54:20 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-08-05 18:54:20 +0300
commit99ff7c741b2b8c837e651f221ec4c0d8b47513fa (patch)
tree75095421a45eed29ec51f00d1beef20c29bba678 /parsers/caves.py
parent12aa6ced869a442e757616e41abde32eee9ea0b8 (diff)
downloadtroggle-99ff7c741b2b8c837e651f221ec4c0d8b47513fa.tar.gz
troggle-99ff7c741b2b8c837e651f221ec4c0d8b47513fa.tar.bz2
troggle-99ff7c741b2b8c837e651f221ec4c0d8b47513fa.zip
bug fix for server
Diffstat (limited to 'parsers/caves.py')
-rw-r--r--parsers/caves.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/parsers/caves.py b/parsers/caves.py
index 8e2abaf..4e720db 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.