account for ipv6 brackets [ip:ip:ip]:port
This commit is contained in:
parent
37618e4a13
commit
219be3f440
|
@ -154,6 +154,12 @@ def add_peer_dialog():
|
|||
response = peer_dialog.run()
|
||||
if response:
|
||||
value = txt_ip.get_text()
|
||||
if ']' in value:
|
||||
#ipv6
|
||||
ip = value.split("]")[0][1:]
|
||||
port = value.split("]")[1][1:]
|
||||
else:
|
||||
#ipv4
|
||||
ip = value.split(":")[0]
|
||||
port = value.split(":")[1]
|
||||
if deluge.common.is_ip(ip):
|
||||
|
|
Loading…
Reference in New Issue