Added missing 'path' field to WAMP addresses in URI editor.
--- a/connectors/WAMP_dialog.py Tue Apr 23 11:00:37 2019 +0200
+++ b/connectors/WAMP_dialog.py Tue Apr 23 11:01:35 2019 +0200
@@ -12,6 +12,7 @@
Schemes = ["WAMP", "WAMPS"]
model = [('host', _("Host:")),
+ ('path', _("Path:")),
('port', _("Port:")),
('realm', _("Realm:"))]
@@ -24,7 +25,8 @@
# pylint: disable=unused-variable
def SetLoc(self, loc):
- hostport, realm, ID = list(islice(chain(loc.split("#"), repeat("")), 3))
+ hostportpath, realm, ID = list(islice(chain(loc.split("#"), repeat("")), 3))
+ hostport, path = list(islice(chain(hostportpath.split("/"), repeat("")), 2))
host, port = list(islice(chain(hostport.split(":"), repeat("")), 2))
self.SetFields(locals())
@@ -35,6 +37,7 @@
template = "{host}" + \
(":{port}" if fields['port'] else '') +\
+ ("/{path}" if fields['path'] else '') +\
"#{realm}#{ID}"
return template.format(**fields)