From 24a39aeca67eb89ab2b3e24aa91a96f4fcacb591 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Fri, 10 Mar 2023 19:57:52 +0800 Subject: [PATCH] Fix option pattern reading --- api/s23_options.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/api/s23_options.py b/api/s23_options.py index cb1fc5a..1a02b6b 100644 --- a/api/s23_options.py +++ b/api/s23_options.py @@ -22,9 +22,10 @@ def inp_in_option(section: list[str]) -> ChangeSet: tokens = s.strip().split() if tokens[0].upper() == 'PATTERN': # can not upper id - cs |= { 'PATTERN' : tokens[1] } + value = tokens[1] if len(tokens) > 1 else '' + cs |= { 'PATTERN' : value } elif tokens[0].upper() == 'QUALITY': # can not upper trace node - value = tokens[1] + value = tokens[1] if len(tokens) > 1 else '' if len(tokens) > 2: value += f' {tokens[2]}' cs |= { 'QUALITY' : value }