Roll back some changes to _compat.py

This commit is contained in:
twangboy 2019-01-25 14:04:24 -07:00 committed by Ch3LL
parent 1fcb0ff264
commit 873cabd6ce
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73

View file

@ -144,6 +144,12 @@ class IPv6AddressScoped(ipaddress.IPv6Address):
:param address:
'''
# pylint: disable-all
if not hasattr(self, '_is_packed_binary'):
# This method (below) won't be around for some Python 3 versions
# and we need check this differently anyway
self._is_packed_binary = lambda p: isinstance(p, bytes)
# pylint: enable-all
if isinstance(address, string_types) and '%' in address:
buff = address.split('%')
if len(buff) != 2: