Skip to content

Commit 63a0336

Browse files
committed
backwards compatability
1 parent e319d1c commit 63a0336

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

inquestlabs.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,11 @@ def is_ipv6 (self, s):
851851
except:
852852
return None
853853

854-
# the ipaddress module expects unicode strings, took me a bit to figure this out.
855-
s = unicode(s)
854+
# python 2/3 compat
855+
try:
856+
s = unicode(s)
857+
except:
858+
pass
856859

857860
# is instance of IPv6 address?
858861
try:

0 commit comments

Comments
 (0)