From d911ab676991e46961278a088bdaad9d42eb8eb5 Mon Sep 17 00:00:00 2001 From: Cao Xuan Hoang Date: Mon, 29 Aug 2016 15:45:56 +0700 Subject: [PATCH] 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: I405d1c6ee7fa688bc611c8a1b8f59344694b1aa3 --- zaqarclient/transport/http.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/zaqarclient/transport/http.py b/zaqarclient/transport/http.py index ec61751b..0c61662a 100644 --- a/zaqarclient/transport/http.py +++ b/zaqarclient/transport/http.py @@ -13,7 +13,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -from distutils.version import LooseVersion +from distutils import version import json from zaqarclient.common import http @@ -75,7 +75,8 @@ class HttpTransport(base.Transport): # request's headers directly. headers = request.headers.copy() if (request.operation == 'queue_update' and - LooseVersion(request.api.label) >= LooseVersion('v2')): + (version.LooseVersion(request.api.label) >= + version.LooseVersion('v2'))): headers['content-type'] = \ 'application/openstack-messaging-v2.0-json-patch' else: