Fix hacking N302 import only modules
* Includes some general tools/hacking cleanup * Fix several N302 cases * Disable N302 until all cases are fixed Change-Id: Iddba07ff13e10dc41a6930749044bb8c0572d279
This commit is contained in:
@@ -25,7 +25,7 @@ import os
|
||||
import sys
|
||||
|
||||
from nova import config
|
||||
from nova.console import websocketproxy as ws
|
||||
from nova import console
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
|
||||
@@ -77,7 +77,8 @@ if __name__ == '__main__':
|
||||
sys.exit(-1)
|
||||
|
||||
# Create and start the NovaWebSockets proxy
|
||||
server = ws.NovaWebSocketProxy(listen_host=CONF.novncproxy_host,
|
||||
server = console.websocketproxy.NovaWebSocketProxy(
|
||||
listen_host=CONF.novncproxy_host,
|
||||
listen_port=CONF.novncproxy_port,
|
||||
source_is_ipv6=CONF.source_is_ipv6,
|
||||
verbose=CONF.verbose,
|
||||
|
@@ -25,7 +25,7 @@ import os
|
||||
import sys
|
||||
|
||||
from nova import config
|
||||
from nova.console import websocketproxy as ws
|
||||
from nova import console
|
||||
from nova.openstack.common import cfg
|
||||
|
||||
|
||||
@@ -77,7 +77,8 @@ if __name__ == '__main__':
|
||||
sys.exit(-1)
|
||||
|
||||
# Create and start the NovaWebSockets proxy
|
||||
server = ws.NovaWebSocketProxy(listen_host=CONF.spicehtml5proxy_host,
|
||||
server = console.websocketproxy.NovaWebSocketProxy(
|
||||
listen_host=CONF.spicehtml5proxy_host,
|
||||
listen_port=CONF.spicehtml5proxy_port,
|
||||
source_is_ipv6=CONF.source_is_ipv6,
|
||||
verbose=CONF.verbose,
|
||||
|
@@ -26,9 +26,9 @@ from boto.ec2 import regioninfo
|
||||
from boto import exception as boto_exc
|
||||
# newer versions of boto use their own wrapper on top of httplib.HTTPResponse
|
||||
try:
|
||||
from boto.connection import HTTPResponse
|
||||
import boto.connection as httplib
|
||||
except ImportError:
|
||||
from httplib import HTTPResponse
|
||||
import httplib
|
||||
import fixtures
|
||||
import webob
|
||||
|
||||
@@ -79,7 +79,7 @@ class FakeHttplibConnection(object):
|
||||
# guess that's a function the web server usually provides.
|
||||
resp = "HTTP/1.0 %s" % resp
|
||||
self.sock = FakeHttplibSocket(resp)
|
||||
self.http_response = HTTPResponse(self.sock)
|
||||
self.http_response = httplib.HTTPResponse(self.sock)
|
||||
# NOTE(vish): boto is accessing private variables for some reason
|
||||
self._HTTPConnection__response = self.http_response
|
||||
self.http_response.begin()
|
||||
|
Reference in New Issue
Block a user