runtime/WAMP: Fixed secret loading into configuration. Fixed secret commandline switch handling.
authorEdouard Tisserant
Thu, 11 Jan 2018 15:39:58 +0100
changeset 1900 9d1547578f55
parent 1899 ff4410112b67
child 1901 e8cf68d69447
runtime/WAMP: Fixed secret loading into configuration. Fixed secret commandline switch handling.
Beremiz_service.py
runtime/WampClient.py
--- a/Beremiz_service.py	Thu Jan 11 13:02:09 2018 +0100
+++ b/Beremiz_service.py	Thu Jan 11 15:39:58 2018 +0100
@@ -60,7 +60,7 @@
 
 
 try:
-    opts, argv = getopt.getopt(sys.argv[1:], "i:p:n:x:t:a:w:c:e:h")
+    opts, argv = getopt.getopt(sys.argv[1:], "i:p:n:x:t:a:w:c:e:s:h")
 except getopt.GetoptError, err:
     # print help information and exit:
     print(str(err))  # will print something like "option -a not recognized"
--- a/runtime/WampClient.py	Thu Jan 11 13:02:09 2018 +0100
+++ b/runtime/WampClient.py	Thu Jan 11 15:39:58 2018 +0100
@@ -152,6 +152,9 @@
 
     WampSecret = LoadWampSecret(secretfname)
 
+    if WampSecret is not None:
+        WSClientConf["secret"] = WampSecret
+
     # create a WAMP application session factory
     component_config = types.ComponentConfig(
         realm=WSClientConf["realm"],