diff options
Diffstat (limited to 'chocula/util.py')
-rw-r--r-- | chocula/util.py | 4 |
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 |