From 82b268d935958bc513535136870c242ef2383da5 Mon Sep 17 00:00:00 2001 From: yumoqing Date: Sun, 7 Jun 2020 21:40:44 +0800 Subject: [PATCH] bugfix --- appPublic/jsonConfig.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/appPublic/jsonConfig.py b/appPublic/jsonConfig.py index 879389a..8580875 100755 --- a/appPublic/jsonConfig.py +++ b/appPublic/jsonConfig.py @@ -22,8 +22,6 @@ class JsonObject(DictObject): JsonObject class load json from a json file """ def __init__(self,jsonholder,keytype='ansi',NS=None): - self.__jsonholder__ = jsonholder - self.NS = NS jhtype = type(jsonholder) if jhtype == type("") or jhtype == type(u''): f = open(jsonholder,'r') @@ -38,10 +36,12 @@ class JsonObject(DictObject): if type(jsonholder) == type(""): f.close() - if self.NS is not None: + if NS is not None: ac = ArgsConvert('$[',']$') a = ac.convert(a,self.NS) - DictObject.__init__(self,**a) + a['__jsonholder__'] = jsonholder + a['NS'] = NS + DictObject.__init__(self,a) @SingletonDecorator class JsonConfig(JsonObject):