From d7d6e752e47a4ad4b11c635b7ff0014ac4c9f1d8 Mon Sep 17 00:00:00 2001 From: Martijn Lentink Date: Thu, 21 Mar 2024 07:13:56 +0100 Subject: [PATCH] Skip non matching bible verses correctly --- bible_import.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bible_import.py b/bible_import.py index ec651b0..a228bbf 100644 --- a/bible_import.py +++ b/bible_import.py @@ -108,7 +108,7 @@ def parse_verse_numbers(verse_label: str): def extract_verse(inp: str): matches = re.match(r"(?P\d+)(?P[a-z])?", inp.strip()) - return (int(matches["verse_int"]), matches["verse_alpha"]) + return (int(matches["verse_int"]), matches["verse_alpha"]) if matches else None # in the exceptional translations where verses are returned in ranges if "-" in verse_input: