Skip to content

Commit

Permalink
If no port defined in tracker url assume it is port 80; fix HelloZero…
Browse files Browse the repository at this point in the history
  • Loading branch information
rllola committed Mar 9, 2019
1 parent 174e8d3 commit fb836fc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Site/SiteAnnouncer.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,11 @@ def getAddressParts(self, tracker):
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
Expand Down

0 comments on commit fb836fc

Please sign in to comment.