Merge "misc py3 changes" into feature/zuulv3
This commit is contained in:
commit
6d4455e7e6
|
@ -438,7 +438,7 @@ class ExecutorClient(object):
|
|||
job.connection.sendAdminRequest(req, timeout=300)
|
||||
self.log.debug("Response to cancel build %s request: %s" %
|
||||
(build, req.response.strip()))
|
||||
if req.response.startswith("OK"):
|
||||
if req.response.startswith(b"OK"):
|
||||
try:
|
||||
del self.builds[job.unique]
|
||||
except:
|
||||
|
|
|
@ -1531,11 +1531,11 @@ class QueueItem(object):
|
|||
except KeyError as e:
|
||||
self.log.error("Error while formatting url for job %s: unknown "
|
||||
"key %s in pattern %s"
|
||||
% (job, e.message, url_pattern))
|
||||
% (job, e.args[0], url_pattern))
|
||||
except AttributeError as e:
|
||||
self.log.error("Error while formatting url for job %s: unknown "
|
||||
"attribute %s in pattern %s"
|
||||
% (job, e.message, url_pattern))
|
||||
% (job, e.args[0], url_pattern))
|
||||
except Exception:
|
||||
self.log.exception("Error while formatting url for job %s with "
|
||||
"pattern %s:" % (job, url_pattern))
|
||||
|
|
|
@ -128,7 +128,7 @@ class WebApp(threading.Thread):
|
|||
def app(self, request):
|
||||
# Try registered paths without a tenant_name first
|
||||
path = request.path
|
||||
for path_re, handler in self.routes.itervalues():
|
||||
for path_re, handler in self.routes.values():
|
||||
if path_re.match(path):
|
||||
return handler(path, '', request)
|
||||
|
||||
|
@ -138,7 +138,7 @@ class WebApp(threading.Thread):
|
|||
# Handle keys
|
||||
if path.startswith('/keys'):
|
||||
return self._handle_keys(request, path)
|
||||
for path_re, handler in self.routes.itervalues():
|
||||
for path_re, handler in self.routes.values():
|
||||
if path_re.match(path):
|
||||
return handler(path, tenant_name, request)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue