connectors/PYRO_dialog.py
changeset 2492 7dd551ac2fa0
parent 2334 d1470c052662
child 2521 48ebcbe7f19b
--- a/connectors/PYRO_dialog.py	Thu Mar 07 21:57:18 2019 +0100
+++ b/connectors/PYRO_dialog.py	Mon Mar 11 01:03:32 2019 +0100
@@ -11,27 +11,28 @@
 from connectors.SchemeEditor import SchemeEditor
 
 
-model = [('host',_("Host:")),
-         ('port',_("Port:"))]
+model = [('host', _("Host:")),
+         ('port', _("Port:"))]
 
 # (scheme, model, secure)
 models = [("LOCAL", [], False), ("PYRO", model, False), ("PYROS", model, True)]
 
 Schemes = list(zip(*models)[0])
 
-_PerSchemeConf = {sch : (mod,sec) for sch,mod,sec in models}
+_PerSchemeConf = {sch: (mod, sec) for sch, mod, sec in models}
+
 
 class PYRO_dialog(SchemeEditor):
     def __init__(self, scheme, *args, **kwargs):
-       
         # ID selector is enabled only on PYROS (secure)
         self.model, self.EnableIDSelector = _PerSchemeConf[scheme]
 
         SchemeEditor.__init__(self, scheme, *args, **kwargs)
 
+    # pylint: disable=unused-variable
     def SetLoc(self, loc):
-        hostport, ID = list(islice(chain(loc.split("#"), repeat("")),2))
-        host, port = list(islice(chain(hostport.split(":"), repeat("")),2))
+        hostport, ID = list(islice(chain(loc.split("#"), repeat("")), 2))
+        host, port = list(islice(chain(hostport.split(":"), repeat("")), 2))
         self.SetFields(locals())
 
     def GetLoc(self):
@@ -39,10 +40,9 @@
             fields = self.GetFields()
             template = "{host}"
             if fields['port']:
-                template += ":{port}" 
+                template += ":{port}"
             if fields['ID']:
-                template += "#{ID}" 
+                template += "#{ID}"
 
             return template.format(**fields)
         return ''
-