From 453f3cbfe753c414e1b136d142e98627e8934613 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Fri, 31 Mar 2023 15:10:04 +0800 Subject: [PATCH 1/2] Fix print info --- api/batch_cmds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/batch_cmds.py b/api/batch_cmds.py index 6657524..479d92b 100644 --- a/api/batch_cmds.py +++ b/api/batch_cmds.py @@ -323,7 +323,7 @@ def execute_batch_command(name: str, cs: ChangeSet) -> ChangeSet: elif operation == API_DELETE: result.merge(execute_delete_command(name, ChangeSet(op))) except: - print(f'ERROR: Fail to execute {todo}!') + print(f'ERROR: Fail to execute {todo}') count = read(name, 'select count(*) as count from batch_operation')['count'] if count == 1: From 5f64439f9f1a172c83b79fc9f3d09b816fdc91b9 Mon Sep 17 00:00:00 2001 From: "WQY\\qiong" Date: Fri, 31 Mar 2023 15:12:29 +0800 Subject: [PATCH 2/2] Enhance epa3 junction inp in --- api/s2_junctions.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/s2_junctions.py b/api/s2_junctions.py index 28aadd0..cbe3c1b 100644 --- a/api/s2_junctions.py +++ b/api/s2_junctions.py @@ -150,8 +150,8 @@ def inp_in_junction(line: str, demand_outside: bool) -> str: id = str(tokens[0]) elevation = float(tokens[1]) - demand = float(tokens[2]) if num_without_desc >= 3 else None - pattern = str(tokens[3]) if num_without_desc >= 4 else None + demand = float(tokens[2]) if num_without_desc >= 3 and tokens[2] != '*' else None + pattern = str(tokens[3]) if num_without_desc >= 4 and tokens[3] != '*' else None pattern = f"'{pattern}'" if pattern != None else 'null' desc = str(tokens[-1]) if has_desc else None