# HG changeset patch # User Edouard Tisserant # Date 1556010095 -7200 # Node ID 7e31997b279923348d0318058df65d4cad087226 # Parent c8cb60bf6c6a98c749ef1ce069cc45c81afcfdff Added missing 'path' field to WAMP addresses in URI editor. diff -r c8cb60bf6c6a -r 7e31997b2799 connectors/WAMP_dialog.py --- 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)