runtime/WampClient.py
branchsvghmi
changeset 3285 d6612579f1d4
parent 2607 bf0c1a40cf37
child 3342 d8e99ecde9a2
equal deleted inserted replaced
3284:55e69df85fe1 3285:d6612579f1d4
   196 
   196 
   197 
   197 
   198 def GetConfiguration():
   198 def GetConfiguration():
   199     global lastKnownConfig
   199     global lastKnownConfig
   200 
   200 
       
   201     WampClientConf = None
       
   202 
   201     if os.path.exists(_WampConf):
   203     if os.path.exists(_WampConf):
   202         WampClientConf = json.load(open(_WampConf))
   204         try: 
   203     else:
   205             WampClientConf = json.load(open(_WampConf))
       
   206         except ValueError:
       
   207             pass
       
   208 
       
   209     if WampClientConf is None:
   204         WampClientConf = defaultWampConfig.copy()
   210         WampClientConf = defaultWampConfig.copy()
   205 
   211 
   206     for itemName in mandatoryConfigItems:
   212     for itemName in mandatoryConfigItems:
   207         if WampClientConf.get(itemName, None) is None:
   213         if WampClientConf.get(itemName, None) is None:
   208             raise Exception(
   214             raise Exception(