Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/disco/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ def host(self):
def port(self):
return self[1]

@property
def host_port(self):
return self[0], self[1]

def __nonzero__(host_port):
return bool(host_port[0])

Expand Down Expand Up @@ -169,7 +173,7 @@ def urlsplit(url, localhost=None, disco_port=None, **kwargs):
path, locstr = locstr, ''
else:
disco_port = disco_port or str(DiscoSettings()['DISCO_PORT'])
host, port = netloc.parse(locstr)
host, port = netloc.parse(locstr).host_port
if scheme == 'disco' or port == disco_port:
if localhost == True or locstr == localhost:
scheme = 'file'
Expand Down