File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ class URI(object):
4141 You can write the protocol in lowercase if you like (``pyro:...``) but it will
4242 automatically be converted to uppercase internally.
4343 """
44- uriRegEx = re .compile (r"(?P<protocol>[Pp][Yy][Rr][Oo][a-zA-Z]*):(?P<object>\S+?)(@(?P<location>\S +))?$" )
44+ uriRegEx = re .compile (r"(?P<protocol>[Pp][Yy][Rr][Oo][a-zA-Z]*):(?P<object>\S+?)(@(?P<location>. +))?$" )
4545
4646 def __init__ (self , uri ):
4747 if isinstance (uri , URI ):
Original file line number Diff line number Diff line change @@ -14,3 +14,13 @@ def test_uri(self):
1414 assert u1 == u2
1515 assert u1 is not u2
1616
17+ def test_unix_uri (self ):
18+ p = Pyro5 .core .URI ("PYRO:12345@./u:/tmp/sockname" )
19+ assert p .object == "12345"
20+ assert p .sockname == "/tmp/sockname"
21+ p = Pyro5 .core .URI ("PYRO:12345@./u:../sockname" )
22+ assert p .object == "12345"
23+ assert p .sockname == "../sockname"
24+ p = Pyro5 .core .URI ("PYRO:12345@./u:/path with spaces/sockname " )
25+ assert p .object == "12345"
26+ assert p .sockname == "/path with spaces/sockname "
You can’t perform that action at this time.
0 commit comments