diff --git a/daemon/core/api/tlv/coreapi.py b/daemon/core/api/tlv/coreapi.py index 73cb0daf..627e6714 100644 --- a/daemon/core/api/tlv/coreapi.py +++ b/daemon/core/api/tlv/coreapi.py @@ -748,13 +748,11 @@ class CoreMessage(object): :return: packed data :rtype: str """ - tlv_data = "" keys = sorted(self.tlv_data.keys()) - + tlv_data = b"" for key in keys: value = self.tlv_data[key] tlv_data += self.tlv_class.pack(key, value) - return tlv_data def repack(self): diff --git a/daemon/core/plugins/sdt.py b/daemon/core/plugins/sdt.py index 0cd200ba..79d7597c 100644 --- a/daemon/core/plugins/sdt.py +++ b/daemon/core/plugins/sdt.py @@ -4,14 +4,9 @@ sdt.py: Scripted Display Tool (SDT3D) helper import logging import socket - -from future.standard_library import install_aliases -install_aliases() - -from urllib.parse import urlparse +from future.moves.urllib.parse import urlparse from core import constants -from core.nodes.base import NodeBase, CoreNetworkBase from core.emulator.enumerations import EventTypes from core.emulator.enumerations import LinkTlvs 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 NodeTypes 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