Merge "Clean imports in code"

This commit is contained in:
Jenkins 2016-08-31 12:44:31 +00:00 committed by Gerrit Code Review
commit 285b6b832b
2 changed files with 5 additions and 5 deletions

View File

@ -19,7 +19,7 @@ import json
import pecan import pecan
import six import six
from webob import Response import webob
from wsme import exc from wsme import exc
from lbaas import exceptions as ex from lbaas import exceptions as ex
@ -53,7 +53,7 @@ def wrap_pecan_controller_exception(func):
try: try:
return func(*args, **kwargs) return func(*args, **kwargs)
except ex.LBaaSException as excp: except ex.LBaaSException as excp:
return Response( return webob.Response(
status=excp.http_code, status=excp.http_code,
content_type='application/json', content_type='application/json',
body=json.dumps(dict( body=json.dumps(dict(

View File

@ -20,7 +20,7 @@ import socket
import shutil import shutil
import time import time
import uuid import uuid
from xml.etree import ElementTree as et from xml import etree
import jenkins import jenkins
import paramiko import paramiko
@ -548,8 +548,8 @@ class MuranoTestsBase(testtools.TestCase, clients.ClientsBase):
) )
def set_tomcat_ip(self, pom_file, ip): def set_tomcat_ip(self, pom_file, ip):
et.register_namespace('', 'http://maven.apache.org/POM/4.0.0') etree.ElementTree.register_namespace('', 'http://maven.apache.org/POM/4.0.0')
tree = et.parse(pom_file) tree = etree.ElementTree.parse(pom_file)
new_url = 'http://{ip}:8080/manager/text'.format(ip=ip) new_url = 'http://{ip}:8080/manager/text'.format(ip=ip)
ns = {'ns': 'http://maven.apache.org/POM/4.0.0'} ns = {'ns': 'http://maven.apache.org/POM/4.0.0'}
for plugin in tree.findall('ns:build/ns:plugins/', ns): for plugin in tree.findall('ns:build/ns:plugins/', ns):