#2486 Renaming functions. #2486
authordporopat <denis.poropat@smarteh.si>
Mon, 14 May 2018 13:05:54 +0200
branch#2486
changeset 2205 4c74218b42e1
parent 2204 25dafeb98b55
child 2206 1e397afc36a9
#2486 Renaming functions.
Beremiz_service.py
runtime/WampClient.py
--- a/Beremiz_service.py	Mon May 14 08:45:44 2018 +0200
+++ b/Beremiz_service.py	Mon May 14 13:05:54 2018 +0200
@@ -619,7 +619,7 @@
     if wampconf is not None:
         try:
             WC.SetServer(pyroserver, wampconf, wampsecret)
-            _wampconf = WC.LoadWampClientConf()
+            _wampconf = WC.GetConfiguration()
             if _wampconf:
                 if _wampconf.get("url", False) and _wampconf.get("active", False):  # TODO : test more ?
                     WC.RegisterWampClient()
--- a/runtime/WampClient.py	Mon May 14 08:45:44 2018 +0200
+++ b/runtime/WampClient.py	Mon May 14 13:05:54 2018 +0200
@@ -177,7 +177,7 @@
             del connector
 
 
-def LoadWampClientConf(items=None):
+def GetConfiguration(items=None):
     try:
         WSClientConf = json.load(open(_WampConf))
         if items and isinstance(items, list):
@@ -196,9 +196,9 @@
         print(_("WAMP load error: "), e)
         return None
 
-def SaveWampClientConf(items):
+def SetConfiguration(items):
     try:
-        WSClientConf = LoadWampClientConf()
+        WSClientConf = json.load(open(_WampConf))
         saveChanges = False
         if items:
             for itemKey in items.keys():
@@ -245,9 +245,9 @@
     global _WampConf
     if wampconf:
         _WampConf = wampconf
-        WSClientConf = LoadWampClientConf()
-    else:
-        WSClientConf = LoadWampClientConf()
+        WSClientConf = GetConfiguration()
+    else:
+        WSClientConf = GetConfiguration()
 
     if not WSClientConf:
         print(_("WAMP client connection not established!"))