From 5ddb2cfc06423e90007d0708c221a1a99d61e905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B2=88=E7=91=97=E6=9D=B0?= <3695888@qq.com> Date: Sat, 9 Jan 2021 22:05:43 +0800 Subject: [PATCH] =?UTF-8?q?awa=EF=BC=9F=20render=20making!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/configes sample/basic_config.json | 3 +++ libs/loads.py | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/configes sample/basic_config.json b/docs/configes sample/basic_config.json index 9fb2c19..b26f7da 100644 --- a/docs/configes sample/basic_config.json +++ b/docs/configes sample/basic_config.json @@ -14,5 +14,8 @@ }, "basic_force" : { "name": ["x", "y", "x&y format:basic_number/unit1:[m]/unit2:[]"] + }, + "basic_poi": { + "name": ["x", "y"] } } \ No newline at end of file diff --git a/libs/loads.py b/libs/loads.py index be6b2d7..f4dbbf4 100644 --- a/libs/loads.py +++ b/libs/loads.py @@ -12,7 +12,7 @@ def config(file_name, stack=None): with open(file_name, "r") as jf: # jf -> json file rd = json.load(jf) except FileNotFoundError: - raise + raise FileNotFoundError("no config file") if stack != None: rd = rd[stack] return rd