If no port defined in tracker url assume it is port 80; fix #1917
This commit is contained in:
parent
174e8d3c19
commit
fb836fcf6f
1 changed files with 5 additions and 1 deletions
|
@ -172,7 +172,11 @@ class SiteAnnouncer(object):
|
|||
if "://" not in tracker or not re.match("^[A-Za-z0-9:/\\.#-]+$", tracker):
|
||||
return None
|
||||
protocol, address = tracker.split("://", 1)
|
||||
ip, port = address.rsplit(":", 1)
|
||||
try:
|
||||
ip, port = address.rsplit(":", 1)
|
||||
except ValueError as err:
|
||||
ip = address
|
||||
port = 80
|
||||
back = {}
|
||||
back["protocol"] = protocol
|
||||
back["address"] = address
|
||||
|
|
Loading…
Reference in a new issue