Skip to content

Commit a3a8e89

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "xvp: Remove use of '_LI' marker"
2 parents 0549765 + 97aa7bb commit a3a8e89

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

nova/vnc/xvp_proxy.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@
2828
import nova.conf
2929
from nova import context
3030
from nova import exception
31-
from nova.i18n import _LI
3231
from nova import objects
3332
from nova import utils
3433
from nova import version
@@ -82,13 +81,12 @@ def handshake(self, req, connect_info, sockets):
8281
data += b
8382
if data.find("\r\n\r\n") != -1:
8483
if not data.split("\r\n")[0].find("200"):
85-
LOG.info(_LI("Error in handshake format: %s"),
86-
data)
84+
LOG.info("Error in handshake format: %s", data)
8785
return
8886
break
8987

9088
if not b or len(data) > 4096:
91-
LOG.info(_LI("Error in handshake: %s"), data)
89+
LOG.info("Error in handshake: %s", data)
9290
return
9391

9492
client = req.environ['eventlet.input'].get_socket()
@@ -103,7 +101,7 @@ def proxy_connection(self, req, connect_info, start_response):
103101
t0.wait()
104102

105103
if not sockets.get('client') or not sockets.get('server'):
106-
LOG.info(_LI("Invalid request: %s"), req)
104+
LOG.info("Invalid request: %s", req)
107105
start_response('400 Invalid Request',
108106
[('content-type', 'text/html')])
109107
return "Invalid Request"
@@ -123,10 +121,10 @@ def proxy_connection(self, req, connect_info, start_response):
123121
def __call__(self, environ, start_response):
124122
try:
125123
req = webob.Request(environ)
126-
LOG.info(_LI("Request: %s"), req)
124+
LOG.info("Request: %s", req)
127125
token = req.params.get('token')
128126
if not token:
129-
LOG.info(_LI("Request made with missing token: %s"), req)
127+
LOG.info("Request made with missing token: %s", req)
130128
start_response('400 Invalid Request',
131129
[('content-type', 'text/html')])
132130
return "Invalid Request"
@@ -137,14 +135,14 @@ def __call__(self, environ, start_response):
137135
connect_info = objects.ConsoleAuthToken.validate(
138136
ctxt, token).to_dict()
139137
except exception.InvalidToken:
140-
LOG.info(_LI("Request made with invalid token: %s"), req)
138+
LOG.info("Request made with invalid token: %s", req)
141139
start_response('401 Not Authorized',
142140
[('content-type', 'text/html')])
143141
return "Not Authorized"
144142

145143
return self.proxy_connection(req, connect_info, start_response)
146144
except Exception as e:
147-
LOG.info(_LI("Unexpected error: %s"), e)
145+
LOG.info("Unexpected error: %s", e)
148146

149147

150148
class SafeHttpProtocol(eventlet.wsgi.HttpProtocol):
@@ -164,8 +162,8 @@ def finish(self):
164162

165163

166164
def get_wsgi_server():
167-
LOG.info(_LI("Starting nova-xvpvncproxy node (version %s)"),
168-
version.version_string_with_package())
165+
LOG.info("Starting nova-xvpvncproxy node (version %s)",
166+
version.version_string_with_package())
169167

170168
LOG.warning('The nova-xvpvncproxy service is deprecated as it is Xen '
171169
'specific and has effectively been replaced by noVNC '

0 commit comments

Comments
 (0)