summaryrefslogtreecommitdiffstats
path: root/parsers/logbooks.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2021-12-30 00:56:09 +0000
committerPhilip Sargent <philip.sargent@klebos.com>2021-12-30 00:56:09 +0000
commit5aac2806186639852765828c7fa9ba55d5933bc5 (patch)
treeb11c74ffff87b2e00a2c554c194ff452941b7d7f /parsers/logbooks.py
parent928c451040b17c5bd05c3ee185895678951f8653 (diff)
downloadtroggle-5aac2806186639852765828c7fa9ba55d5933bc5.tar.gz
troggle-5aac2806186639852765828c7fa9ba55d5933bc5.tar.bz2
troggle-5aac2806186639852765828c7fa9ba55d5933bc5.zip
Bug fix and extra comment
Diffstat (limited to 'parsers/logbooks.py')
-rw-r--r--parsers/logbooks.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/parsers/logbooks.py b/parsers/logbooks.py
index 6b6c121..a1dd5ff 100644
--- a/parsers/logbooks.py
+++ b/parsers/logbooks.py
@@ -680,10 +680,13 @@ def LoadLogbooks():
TROG['pagecache']['expedition'][expo.year] = None # clear cache
if expo.year not in nologbook:
print((" - Logbook for: " + expo.year))
- numentries = LoadLogbookForExpedition(expo, entries[expo.year]) # this actually loads the logbook for one year
- log.write("{} {:5d} should be {}\n".format(expo.year, numentries, entries[expo.year]))
- nlbe[expo.year]=numentries
- expd[expo.year]= 0
+ if expo.year in entries:
+ numentries = LoadLogbookForExpedition(expo, entries[expo.year]) # this actually loads the logbook for one year
+ log.write("{} {:5d} should be {}\n".format(expo.year, numentries, entries[expo.year]))
+ nlbe[expo.year]=numentries
+ expd[expo.year]= 0
+ else:
+ print((" - No Logbook yet for: " + expo.year)) # catch case when preparing for next expo
print("** total trips in ObjStore:", len(trips))
#for i in logdataissues:
# print("{:15s}: {}".format(i, logdataissues[i]))