# HG changeset patch
# User Edouard Tisserant
# Date 1515681598 -3600
# Node ID 9d1547578f559cde56e0211d129a633f8b678bcf
# Parent  ff4410112b67a0d5205afb69151a428f97e35eff
runtime/WAMP: Fixed secret loading into configuration. Fixed secret commandline switch handling.

diff -r ff4410112b67 -r 9d1547578f55 Beremiz_service.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"
diff -r ff4410112b67 -r 9d1547578f55 runtime/WampClient.py
--- 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"],