connectors/PYRO/__init__.py
changeset 2338 2c3222433244
parent 2334 d1470c052662
child 2339 48b4eba13064
--- a/connectors/PYRO/__init__.py	Fri Nov 16 14:04:51 2018 +0100
+++ b/connectors/PYRO/__init__.py	Mon Nov 19 10:39:50 2018 +0100
@@ -51,8 +51,8 @@
     """
     confnodesroot.logger.write(_("PYRO connecting to URI : %s\n") % uri)
 
-    servicetype, location = uri.split("://")
-    if servicetype == "PYROS":
+    scheme, location = uri.split("://")
+    if scheme == "PYROS":
         import connectors.PYRO.PSK_Adapter
         schemename = "PYROLOCPSK"
         url, ID = location.split('#') #TODO fix exception when # not found
@@ -124,7 +124,7 @@
         confnodesroot.logger.write_error(_("Cannot get PLC ID - connection failed.\n"))
         return None
 
-    if servicetype != "PYROS":
+    if scheme != "PYROS":
         ID,PSK = IDPSK
         secdir = os.path.join(str(confnodesroot.ProjectPath), 'psk')
         if not os.path.exists(secdir):