Merge "Clean imports in code"
This commit is contained in:
commit
285b6b832b
@ -19,7 +19,7 @@ import json
|
||||
|
||||
import pecan
|
||||
import six
|
||||
from webob import Response
|
||||
import webob
|
||||
from wsme import exc
|
||||
|
||||
from lbaas import exceptions as ex
|
||||
@ -53,7 +53,7 @@ def wrap_pecan_controller_exception(func):
|
||||
try:
|
||||
return func(*args, **kwargs)
|
||||
except ex.LBaaSException as excp:
|
||||
return Response(
|
||||
return webob.Response(
|
||||
status=excp.http_code,
|
||||
content_type='application/json',
|
||||
body=json.dumps(dict(
|
||||
|
@ -20,7 +20,7 @@ import socket
|
||||
import shutil
|
||||
import time
|
||||
import uuid
|
||||
from xml.etree import ElementTree as et
|
||||
from xml import etree
|
||||
|
||||
import jenkins
|
||||
import paramiko
|
||||
@ -548,8 +548,8 @@ class MuranoTestsBase(testtools.TestCase, clients.ClientsBase):
|
||||
)
|
||||
|
||||
def set_tomcat_ip(self, pom_file, ip):
|
||||
et.register_namespace('', 'http://maven.apache.org/POM/4.0.0')
|
||||
tree = et.parse(pom_file)
|
||||
etree.ElementTree.register_namespace('', 'http://maven.apache.org/POM/4.0.0')
|
||||
tree = etree.ElementTree.parse(pom_file)
|
||||
new_url = 'http://{ip}:8080/manager/text'.format(ip=ip)
|
||||
ns = {'ns': 'http://maven.apache.org/POM/4.0.0'}
|
||||
for plugin in tree.findall('ns:build/ns:plugins/', ns):
|
||||
|
Loading…
x
Reference in New Issue
Block a user