Fix reading inp bug

This commit is contained in:
WQY\qiong
2023-02-09 00:08:36 +08:00
parent 7f9c9a8e8c
commit 8979885eac
6 changed files with 45 additions and 38 deletions

View File

@@ -35,8 +35,9 @@ def set_rule(name: str, cs: ChangeSet) -> ChangeSet:
def inp_in_rule(section: list[str]) -> ChangeSet:
cs = ChangeSet(g_update_prefix | {'type': 'rule', 'rules' : section})
return cs
if len(section) > 0:
return ChangeSet(g_update_prefix | {'type': 'rule', 'rules' : section})
return ChangeSet()
def inp_out_rule(name: str) -> list[str]: