diff --git a/impacket/dcerpc/v5/dcom/wmi.py b/impacket/dcerpc/v5/dcom/wmi.py index 79a1fb1afc..20dd06e9c7 100644 --- a/impacket/dcerpc/v5/dcom/wmi.py +++ b/impacket/dcerpc/v5/dcom/wmi.py @@ -30,6 +30,7 @@ import collections.abc import logging import six +from collections import OrderedDict from impacket.dcerpc.v5.ndr import NDRSTRUCT, NDRUniConformantArray, NDRPOINTER, NDRUniConformantVaryingArray, NDRUNION, \ NDRENUM @@ -57,13 +58,6 @@ def format_structure(d, level=0): else: x = str(d) return x -try: - from collections import OrderedDict -except: - try: - from ordereddict.ordereddict import OrderedDict - except: - from ordereddict import OrderedDict class DCERPCSessionError(DCERPCException): def __init__(self, error_string=None, error_code=None, packet=None): diff --git a/impacket/ese.py b/impacket/ese.py index 244b6bb8f3..18e0827d9c 100644 --- a/impacket/ese.py +++ b/impacket/ese.py @@ -29,13 +29,7 @@ from __future__ import division from __future__ import print_function from impacket import LOG -try: - from collections import OrderedDict -except: - try: - from ordereddict.ordereddict import OrderedDict - except: - from ordereddict import OrderedDict +from collections import OrderedDict from impacket.structure import Structure, hexdump from struct import unpack from binascii import hexlify