Merge "Remove unneeded try..except in heartbeat"

This commit is contained in:
Jenkins 2016-09-23 16:19:36 +00:00 committed by Gerrit Code Review
commit fc4817d5b6

View File

@ -457,12 +457,7 @@ class AgentDeployMixin(object):
{'node': node.uuid, {'node': node.uuid,
'heartbeat': driver_internal_info.get('agent_last_heartbeat')}) 'heartbeat': driver_internal_info.get('agent_last_heartbeat')})
driver_internal_info['agent_last_heartbeat'] = int(time.time()) driver_internal_info['agent_last_heartbeat'] = int(time.time())
try: driver_internal_info['agent_url'] = callback_url
driver_internal_info['agent_url'] = callback_url
except KeyError:
raise exception.MissingParameterValue(_('For heartbeat operation, '
'"agent_url" must be '
'specified.'))
node.driver_internal_info = driver_internal_info node.driver_internal_info = driver_internal_info
node.save() node.save()