mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Lintfix refactor: remove duplicate returns as not needed
This commit is contained in:
parent
5932a0d152
commit
0a86112f24
1 changed files with 8 additions and 8 deletions
|
@ -181,15 +181,15 @@ class IPv6AddressScoped(ipaddress.IPv6Address):
|
|||
:param data:
|
||||
:return:
|
||||
'''
|
||||
if sys.version_info.major > 2:
|
||||
return isinstance(data, bytes)
|
||||
|
||||
packed = False
|
||||
if len(data) == 16 and ':' not in data:
|
||||
try:
|
||||
packed = bool(int(str(bytearray(data)).encode('hex'), 16))
|
||||
except ValueError:
|
||||
pass
|
||||
if sys.version_info.major > 2:
|
||||
packed = isinstance(data, bytes)
|
||||
else:
|
||||
if len(data) == 16 and ':' not in data:
|
||||
try:
|
||||
packed = bool(int(str(bytearray(data)).encode('hex'), 16))
|
||||
except ValueError:
|
||||
pass
|
||||
|
||||
return packed
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue