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:

committed by
wangxiyuan

parent
540c807d58
commit
d911ab6769
@@ -13,7 +13,7 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
|
|
||||||
from distutils.version import LooseVersion
|
from distutils import version
|
||||||
import json
|
import json
|
||||||
|
|
||||||
from zaqarclient.common import http
|
from zaqarclient.common import http
|
||||||
@@ -75,7 +75,8 @@ class HttpTransport(base.Transport):
|
|||||||
# request's headers directly.
|
# request's headers directly.
|
||||||
headers = request.headers.copy()
|
headers = request.headers.copy()
|
||||||
if (request.operation == 'queue_update' and
|
if (request.operation == 'queue_update' and
|
||||||
LooseVersion(request.api.label) >= LooseVersion('v2')):
|
(version.LooseVersion(request.api.label) >=
|
||||||
|
version.LooseVersion('v2'))):
|
||||||
headers['content-type'] = \
|
headers['content-type'] = \
|
||||||
'application/openstack-messaging-v2.0-json-patch'
|
'application/openstack-messaging-v2.0-json-patch'
|
||||||
else:
|
else:
|
||||||
|
Reference in New Issue
Block a user