From: Armaan Bhojwani Date: Tue, 9 Feb 2021 03:58:20 +0000 (-0500) Subject: Make parser reject single column tables X-Git-Tag: v0.6.0~38 X-Git-Url: https://git.armaanb.net/?p=lightcards.git;a=commitdiff_plain;h=da0b2a5411a041e29a0574d3aeb3f0da311ff5c1 Make parser reject single column tables --- 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