|
|
@@ -227,11 +227,9 @@ def parsesockstr(sockstr): |
|
|
|
if '=' not in rem: |
|
|
|
if proto == 'unix' and rem[0] != '/': |
|
|
|
raise ValueError('bare path MUST start w/ a slash (/).') |
|
|
|
|
|
|
|
if proto == 'unix': |
|
|
|
elif proto == 'unix': |
|
|
|
args = { 'path': rem } |
|
|
|
|
|
|
|
if proto == 'udp': |
|
|
|
elif proto in ('tcp', 'udp'): |
|
|
|
h, p = rem.split(':') |
|
|
|
args = { 'host': h, 'port': p } |
|
|
|
else: |
|
|
@@ -557,6 +555,8 @@ class Tests_misc(unittest.TestCase): |
|
|
|
# function |
|
|
|
'unix:/apath': ('unix', { 'path': '/apath' }), |
|
|
|
'unix:path=apath': ('unix', { 'path': 'apath' }), |
|
|
|
'tcp:ahost:1234': ('tcp', { 'host': 'ahost', |
|
|
|
'port': 1234 }), |
|
|
|
'tcp:host=apath': ('tcp', { 'host': 'apath' }), |
|
|
|
'tcp:host=apath,port=5': ('tcp', { 'host': 'apath', |
|
|
|
'port': 5 }), |
|
|
|