summaryrefslogtreecommitdiffstats
path: root/parsers/caves.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@gmail.com>2023-08-03 12:06:35 +0300
committerPhilip Sargent <philip.sargent@gmail.com>2023-08-03 12:06:35 +0300
commit0dfe9d94b2114d7709ae24c0f859127745ffa524 (patch)
tree97215ecef4e680b7d4f953eece2456e39a702d9a /parsers/caves.py
parent0efdfe66d5d1e70a418188913bf6883df60bf5c2 (diff)
downloadtroggle-0dfe9d94b2114d7709ae24c0f859127745ffa524.tar.gz
troggle-0dfe9d94b2114d7709ae24c0f859127745ffa524.tar.bz2
troggle-0dfe9d94b2114d7709ae24c0f859127745ffa524.zip
update pendingcaves only on local dev machine
Diffstat (limited to 'parsers/caves.py')
-rw-r--r--parsers/caves.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/parsers/caves.py b/parsers/caves.py
index b68eee0..8a746ac 100644
--- a/parsers/caves.py
+++ b/parsers/caves.py
@@ -726,9 +726,11 @@ def read_cave(filename, cave=None):
def add_cave_to_pending_list(id):
fpending = Path(CAVEDESCRIPTIONS, "pendingcaves.txt")
- if fpending.is_file():
- with open(fpending, "a") as pend:
- pend.write(f"{id}\n")
+ 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.
def readcaves():
"""Called from databaseReset mass importer.