make sure this variable is actually defined

This commit is contained in:
James Kafader 2017-05-16 18:16:54 -07:00
parent 55331083b3
commit a0d17151fe

View File

@ -220,10 +220,10 @@ class ServiceRegistry(object):
the unique service, if there is one and it is healthy, otherwise
None
'''
# use the same concept of 'now' for all queries
now = self.rr.now().run()
if candidate is not None:
candidate['id'] = role
# use the same concept of 'now' for all queries
now = rr.now().run()
if not 'heartbeat_interval' in candidate:
raise Exception(