Clean imports in code
This patch set modifies lines which are importing objects instead of modules. As per openstack import guide lines, user should import modules in a file not objects. http://docs.openstack.org/developer/hacking/#imports Change-Id: I7c4d53ecb911e57860979d35231193a6667d9e63
This commit is contained in:
parent
e6642d97fd
commit
72dd51eb5d
|
@ -14,7 +14,7 @@
|
|||
# under the License.
|
||||
#
|
||||
|
||||
from hashlib import md5
|
||||
import hashlib
|
||||
import math
|
||||
import time
|
||||
|
||||
|
@ -50,7 +50,7 @@ class DotHillClient(object):
|
|||
hash_ = "%s_%s" % (self._login, self._password)
|
||||
if six.PY3:
|
||||
hash_ = hash_.encode('utf-8')
|
||||
hash_ = md5(hash_)
|
||||
hash_ = hashlib.md5(hash_)
|
||||
digest = hash_.hexdigest()
|
||||
|
||||
url = self._base_url + "/login/" + digest
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
|
||||
import base64
|
||||
import functools
|
||||
from hashlib import md5
|
||||
import hashlib
|
||||
import json
|
||||
import math
|
||||
from random import randint
|
||||
|
@ -100,7 +100,7 @@ class AESCipher(object):
|
|||
d = d_i = ''
|
||||
while len(d) < key_length + iv_length:
|
||||
md5_str = d_i + password + salt
|
||||
d_i = md5(md5_str).digest()
|
||||
d_i = hashlib.md5(md5_str).digest()
|
||||
d += d_i
|
||||
return d[:key_length], d[key_length:key_length + iv_length]
|
||||
|
||||
|
|
Loading…
Reference in New Issue