Browse Source

Merge "Clean imports in code"

changes/66/363566/2
Jenkins 2 years ago
parent
commit
285b6b832b

+ 2
- 2
murano-apps/LBaaS-interface/package/Resources/scripts/lbaas_api-0.1/lbaas/utils/rest_utils.py View File

@@ -19,7 +19,7 @@ import json
19 19
 
20 20
 import pecan
21 21
 import six
22
-from webob import Response
22
+import webob
23 23
 from wsme import exc
24 24
 
25 25
 from lbaas import exceptions as ex
@@ -53,7 +53,7 @@ def wrap_pecan_controller_exception(func):
53 53
         try:
54 54
             return func(*args, **kwargs)
55 55
         except ex.LBaaSException as excp:
56
-            return Response(
56
+            return webob.Response(
57 57
                 status=excp.http_code,
58 58
                 content_type='application/json',
59 59
                 body=json.dumps(dict(

+ 3
- 3
tests/base.py View File

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

Loading…
Cancel
Save