Handle invalid build UUID in finger gateway
The RPC call will return an empty dict if the build UUID cannot be found. We should handle that gracefully. Change-Id: Ie0fa49e08d9213bf7226c6301896507866c36e28
This commit is contained in:
parent
420e8a460b
commit
1c7d1e1ba1
|
@ -66,6 +66,12 @@ class RequestHandler(streamer_utils.BaseFingerRequestHandler):
|
||||||
try:
|
try:
|
||||||
build_uuid = self.getCommand()
|
build_uuid = self.getCommand()
|
||||||
port_location = self.rpc.get_job_log_stream_address(build_uuid)
|
port_location = self.rpc.get_job_log_stream_address(build_uuid)
|
||||||
|
|
||||||
|
if not port_location:
|
||||||
|
msg = 'Invalid build UUID %s' % build_uuid
|
||||||
|
self.request.sendall(msg.encode('utf-8'))
|
||||||
|
return
|
||||||
|
|
||||||
self._fingerClient(
|
self._fingerClient(
|
||||||
port_location['server'],
|
port_location['server'],
|
||||||
port_location['port'],
|
port_location['port'],
|
||||||
|
|
Loading…
Reference in New Issue