byte string fix in coreapi, different approach to urlparse compatibility to avoid other issues
This commit is contained in:
parent
c4c1a10f05
commit
f5efecabf0
2 changed files with 3 additions and 9 deletions
|
@ -748,13 +748,11 @@ class CoreMessage(object):
|
||||||
:return: packed data
|
:return: packed data
|
||||||
:rtype: str
|
:rtype: str
|
||||||
"""
|
"""
|
||||||
tlv_data = ""
|
|
||||||
keys = sorted(self.tlv_data.keys())
|
keys = sorted(self.tlv_data.keys())
|
||||||
|
tlv_data = b""
|
||||||
for key in keys:
|
for key in keys:
|
||||||
value = self.tlv_data[key]
|
value = self.tlv_data[key]
|
||||||
tlv_data += self.tlv_class.pack(key, value)
|
tlv_data += self.tlv_class.pack(key, value)
|
||||||
|
|
||||||
return tlv_data
|
return tlv_data
|
||||||
|
|
||||||
def repack(self):
|
def repack(self):
|
||||||
|
|
|
@ -4,14 +4,9 @@ sdt.py: Scripted Display Tool (SDT3D) helper
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
import socket
|
import socket
|
||||||
|
from future.moves.urllib.parse import urlparse
|
||||||
from future.standard_library import install_aliases
|
|
||||||
install_aliases()
|
|
||||||
|
|
||||||
from urllib.parse import urlparse
|
|
||||||
|
|
||||||
from core import constants
|
from core import constants
|
||||||
from core.nodes.base import NodeBase, CoreNetworkBase
|
|
||||||
from core.emulator.enumerations import EventTypes
|
from core.emulator.enumerations import EventTypes
|
||||||
from core.emulator.enumerations import LinkTlvs
|
from core.emulator.enumerations import LinkTlvs
|
||||||
from core.emulator.enumerations import LinkTypes
|
from core.emulator.enumerations import LinkTypes
|
||||||
|
@ -20,6 +15,7 @@ from core.emulator.enumerations import MessageTypes
|
||||||
from core.emulator.enumerations import NodeTlvs
|
from core.emulator.enumerations import NodeTlvs
|
||||||
from core.emulator.enumerations import NodeTypes
|
from core.emulator.enumerations import NodeTypes
|
||||||
from core.nodes import nodeutils
|
from core.nodes import nodeutils
|
||||||
|
from core.nodes.base import NodeBase, CoreNetworkBase
|
||||||
|
|
||||||
|
|
||||||
# TODO: A named tuple may be more appropriate, than abusing a class dict like this
|
# TODO: A named tuple may be more appropriate, than abusing a class dict like this
|
||||||
|
|
Loading…
Add table
Reference in a new issue