aboutsummaryrefslogtreecommitdiffstats
path: root/chocula/util.py
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@archive.org>2020-06-02 17:00:36 -0700
committerBryan Newbold <bnewbold@archive.org>2020-06-02 17:00:36 -0700
commit3c5775eea38fd062a9d111db6c5fc2f6fa002b2e (patch)
tree7fcf838f0773b9e1911bef90b79c54284afad957 /chocula/util.py
parent0b9f64d2b4409eefbd8b20a9a5eb2e1e2b7650fd (diff)
downloadchocula-3c5775eea38fd062a9d111db6c5fc2f6fa002b2e.tar.gz
chocula-3c5775eea38fd062a9d111db6c5fc2f6fa002b2e.zip
fixes for KBART import
Diffstat (limited to 'chocula/util.py')
-rw-r--r--chocula/util.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/chocula/util.py b/chocula/util.py
index 09860d8..4080e5b 100644
--- a/chocula/util.py
+++ b/chocula/util.py
@@ -1,4 +1,5 @@
+import sys
from dataclasses import dataclass
from typing import Dict, Optional
@@ -171,7 +172,8 @@ def gaps_to_spans(first, last, gaps):
print("mangled years: {}".format((first, last, gaps)), file=sys.stderr)
full = list(range(first, last+1))
for missing in gaps:
- full.remove(missing)
+ if missing in full:
+ full.remove(missing)
spans = []
low = None
last = None