diff --git a/ConsumerLocator.py b/ConsumerLocator.py index bebd1cb..410c644 100644 --- a/ConsumerLocator.py +++ b/ConsumerLocator.py @@ -14,7 +14,14 @@ __version__text__ = "1" class ConsumerLocator: + """ + Manages the list of consumers. + """ + def __init__(self): + """ + Initialize class. + """ self.consumerList = [{"Host": "KnownHost", "State": True, "LastOk": datetime.datetime.now()}] self.currentConsumer = self.consumerList[0]["Host"] @@ -45,9 +52,8 @@ class ConsumerLocator: def updateConsumer(self): """ Checks all the consumers in the list and updates the current consumer if necessary. - :return: the current consumer + :return: the current consumer or None if there are no available customers at the moment. """ - self.updateConsumerList() if not self.checkConsumer():