From da0b2a5411a041e29a0574d3aeb3f0da311ff5c1 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Mon, 8 Feb 2021 22:58:20 -0500 Subject: [PATCH] Make parser reject single column tables --- lightcards/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightcards/parse.py b/lightcards/parse.py index ea3468d..6fc2a75 100644 --- a/lightcards/parse.py +++ b/lightcards/parse.py @@ -32,7 +32,7 @@ def parse_html(html): sys.exit("lightcards: No table found") ths = soup.find_all("th") - if not len(ths) in [1, 2]: + if len(ths) != 2: sys.exit("lightcards: Headings malformed") # Return a tuple of nested lists -- 2.39.2