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
This commit is contained in:
Cao Xuan Hoang
2016-08-29 15:45:56 +07:00
committed by wangxiyuan
parent 540c807d58
commit d911ab6769

View File

@@ -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: