mirror of
https://github.com/espressif/openthread.git
synced 2026-10-15 12:17:41 +00:00
[tests] require python3 and drop support for python2 (#4220)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python
|
||||
#!/usr/bin/env python3
|
||||
#
|
||||
# Copyright (c) 2016, The OpenThread Authors.
|
||||
# All rights reserved.
|
||||
@@ -28,7 +28,6 @@
|
||||
#
|
||||
|
||||
import struct
|
||||
import sys
|
||||
|
||||
from binascii import hexlify
|
||||
from enum import IntEnum
|
||||
@@ -69,9 +68,6 @@ class MessageInfo(object):
|
||||
if isinstance(value, bytearray):
|
||||
value = bytes(value)
|
||||
|
||||
elif isinstance(value, str) and sys.version_info[0] == 2:
|
||||
value = value.decode("utf-8")
|
||||
|
||||
return ipaddress.ip_address(value)
|
||||
|
||||
@property
|
||||
|
||||
Reference in New Issue
Block a user