Runtime: more robust loading of Wamp config, specially in case config file was corrupted.
--- a/runtime/WampClient.py Tue Jul 20 09:43:35 2021 +0200
+++ b/runtime/WampClient.py Tue Jul 20 10:52:25 2021 +0200
@@ -198,9 +198,15 @@
def GetConfiguration():
global lastKnownConfig
+ WampClientConf = None
+
if os.path.exists(_WampConf):
- WampClientConf = json.load(open(_WampConf))
- else:
+ try:
+ WampClientConf = json.load(open(_WampConf))
+ except ValueError:
+ pass
+
+ if WampClientConf is None:
WampClientConf = defaultWampConfig.copy()
for itemName in mandatoryConfigItems: