From 1707c01306b0aeb42da95fd6d60305d24fa9096f Mon Sep 17 00:00:00 2001 From: John McMaster Date: Tue, 13 Nov 2018 19:47:13 -0800 Subject: [PATCH] parse_db_line: verbose error on mask input Signed-off-by: John McMaster --- prjxray/util.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/prjxray/util.py b/prjxray/util.py index 35603fc9..60f1c46f 100644 --- a/prjxray/util.py +++ b/prjxray/util.py @@ -78,6 +78,8 @@ def parse_db_line(line): # Ex: CLBLL_L.SLICEL_X0.AMUX.A5Q assert len(parts), "Empty line" tag = parts[0] + if tag == 'bit': + raise ValueError("Wanted bits db but got mask db") assert re.match(r'[A-Z0-9_.]+', tag), "Invalid tag name: %s, line: %s" % (tag, line) orig_bits = line.replace(tag + " ", "")