Ticket #42698: patch-cymru-__init__.py.diff
File patch-cymru-__init__.py.diff, 482 bytes (added by jul_bsd@…, 11 years ago) |
---|
-
cymru/__init__.py
old new 19 19 return IPy.IP(ip).strCompressed() 20 20 21 21 except ImportError as e: 22 import ipaddress # sucks for reverse. 22 try: 23 ## python >= 3 24 import ipaddress # sucks for reverse. 25 except ImportError: 26 import ipaddr as ipaddress 23 27 def ip_reverse(ip): 24 28 ip = ipaddress.ip_address(ip) 25 29 if ip.version == 4: