Remove Python 2-specific imports
Change-Id: I64810898cd9126cf619df0b8f60e6fa01958943e Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This commit is contained in:
parent
0396bba4cc
commit
452913a284
|
@ -20,11 +20,6 @@ Manage hosts in the current zone.
|
||||||
import collections
|
import collections
|
||||||
import functools
|
import functools
|
||||||
import time
|
import time
|
||||||
try:
|
|
||||||
from collections import UserDict as IterableUserDict # Python 3
|
|
||||||
except ImportError:
|
|
||||||
from UserDict import IterableUserDict # Python 2
|
|
||||||
|
|
||||||
|
|
||||||
import iso8601
|
import iso8601
|
||||||
from oslo_log import log as logging
|
from oslo_log import log as logging
|
||||||
|
@ -47,7 +42,7 @@ LOG = logging.getLogger(__name__)
|
||||||
HOST_INSTANCE_SEMAPHORE = "host_instance"
|
HOST_INSTANCE_SEMAPHORE = "host_instance"
|
||||||
|
|
||||||
|
|
||||||
class ReadOnlyDict(IterableUserDict):
|
class ReadOnlyDict(collections.UserDict):
|
||||||
"""A read-only dict."""
|
"""A read-only dict."""
|
||||||
|
|
||||||
def __init__(self, source=None):
|
def __init__(self, source=None):
|
||||||
|
|
|
@ -20,13 +20,9 @@ import copy
|
||||||
import hashlib
|
import hashlib
|
||||||
import hmac
|
import hmac
|
||||||
import os
|
import os
|
||||||
|
import pickle
|
||||||
import re
|
import re
|
||||||
|
|
||||||
try: # python 2
|
|
||||||
import pickle
|
|
||||||
except ImportError: # python 3
|
|
||||||
import cPickle as pickle
|
|
||||||
|
|
||||||
from keystoneauth1 import exceptions as ks_exceptions
|
from keystoneauth1 import exceptions as ks_exceptions
|
||||||
from keystoneauth1 import session
|
from keystoneauth1 import session
|
||||||
import mock
|
import mock
|
||||||
|
|
Loading…
Reference in New Issue