Clean imports in code
Most imports that don't match[1], has been cleaned in [2]. There are still some left. [1] http://docs.openstack.org/developer/hacking/#imports [2] I5aa415966a94bec00257c4d34bd5633de7bb34c8 Change-Id: Ib50baf7f7a2da18ffb305c24667dd921a4bcea89
This commit is contained in:
@@ -15,7 +15,7 @@ import os
|
||||
import sys
|
||||
import time
|
||||
|
||||
from collections import deque
|
||||
import collections
|
||||
import eventlet
|
||||
import greenlet
|
||||
from neutron_lib import constants as n_const
|
||||
@@ -184,7 +184,7 @@ class wrap_func_retry(object):
|
||||
class RateLimiter(object):
|
||||
def __init__(self, max_rate=3, time_unit=1, **kwargs):
|
||||
self.time_unit = time_unit
|
||||
self.deque = deque(maxlen=max_rate)
|
||||
self.deque = collections.deque(maxlen=max_rate)
|
||||
|
||||
def __call__(self):
|
||||
if self.deque.maxlen == len(self.deque):
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
from collections import defaultdict
|
||||
import collections
|
||||
import copy
|
||||
import threading
|
||||
|
||||
@@ -73,7 +73,7 @@ class TenantDbStore(object):
|
||||
class DbStore(object):
|
||||
|
||||
def __init__(self):
|
||||
self.tenant_dbs = defaultdict(TenantDbStore)
|
||||
self.tenant_dbs = collections.defaultdict(TenantDbStore)
|
||||
self.networks = {}
|
||||
|
||||
def get(self, table_name, key, topic):
|
||||
|
||||
Reference in New Issue
Block a user