From ea87d93bfe51497ef5b7d036349364964b676a5b Mon Sep 17 00:00:00 2001 From: Hanxi Liu Date: Mon, 19 Sep 2016 23:29:47 +0800 Subject: [PATCH] Remove import objects and use import modules Do not import objects, only modules. Following the OpenStack Style Guidelines,[1] this patch will unify the import. [1] http://docs.openstack.org/developer/hacking/#imports Change-Id: Ie25aaa5a259cdfb151cb57800995996e9797549d --- ceilometer/dispatcher/gnocchi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ceilometer/dispatcher/gnocchi.py b/ceilometer/dispatcher/gnocchi.py index 44b1f64ec5..a5ff20f718 100644 --- a/ceilometer/dispatcher/gnocchi.py +++ b/ceilometer/dispatcher/gnocchi.py @@ -13,7 +13,7 @@ # License for the specific language governing permissions and limitations # under the License. from collections import defaultdict -from hashlib import md5 +import hashlib import itertools import operator import re @@ -38,7 +38,7 @@ from ceilometer import gnocchi_client from ceilometer import keystone_client NAME_ENCODED = __name__.encode('utf-8') -CACHE_NAMESPACE = uuid.UUID(bytes=md5(NAME_ENCODED).digest()) +CACHE_NAMESPACE = uuid.UUID(bytes=hashlib.md5(NAME_ENCODED).digest()) LOG = log.getLogger(__name__) dispatcher_opts = [