import ipaddress
from subprocess import check_output, CalledProcessError
from util import check_core_path, get_core_path
+try:
+ text_type = unicode
+except NameError:
+ text_type = str
class Hook(object):
return '{!s} ({!s})'.format(val, ':'.join(['{:02x}'.format(
ord(x)) for x in val]))
try:
+ # we don't call test_type(val) because it is a packed value.
return '{!s} ({!s})'.format(val, str(
ipaddress.ip_address(val)))
except ipaddress.AddressValueError: