From ac1cb9937d48917669a837b6e233784a45cabced Mon Sep 17 00:00:00 2001 From: Danny Staple Date: Sun, 2 Jan 2022 12:09:21 +0000 Subject: [PATCH] Copied incorrectly --- adafruit_pioasm.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/adafruit_pioasm.py b/adafruit_pioasm.py index e58d774..750248f 100644 --- a/adafruit_pioasm.py +++ b/adafruit_pioasm.py @@ -105,7 +105,8 @@ def assemble(text_program): if len(instruction) > 2: try: assembled[-1] |= CONDITIONS.index(instruction[1]) << 5 - raise SyntaxError(f"Invalid jmp condition {instruction[1]}") + except ValueError: + raise SyntaxError(f"Invalid jmp condition {instruction[1]}") elif instruction[0] == "wait": # instr delay p sr index