Ticket #704: deluge-1.1.0-rc3-url-hostname-none.patch
File deluge-1.1.0-rc3-url-hostname-none.patch, 1.0 KB (added by , 16 years ago) |
---|
-
deluge/core/torrent.py
old new 521 521 host = (url.hostname or 'DHT') 522 522 # Check if hostname is an IP address and just return it if that's the case 523 523 import socket 524 try: 525 socket.inet_aton(url.hostname) 526 except socket.error: 527 pass 528 else: 529 # This is an IP address because an exception wasn't raised 530 return url.hostname 524 if url.hostname != None : 525 try: 526 socket.inet_aton(url.hostname) 527 except socket.error: 528 pass 529 else: 530 # This is an IP address because an exception wasn't raised 531 return url.hostname 531 532 532 533 parts = host.split(".") 533 534 if len(parts) > 2: