Commit 27c27f0b authored by Julien Muchembled's avatar Julien Muchembled

client: fix AttributeError when connected to a master that happens to be secondary

This fixes up commit 23b6a66a,
which reimplements election.

  poll raised, retrying
  Traceback (most recent call last):
    ...
    File "neo/client/handlers/master.py", line 41, in notPrimaryMaster
      super(PrimaryNotificationsHandler, self).notPrimaryMaster(*args)
    File "neo/lib/handler.py", line 157, in notPrimaryMaster
      assert primary != self.app.server
    File "neo/client/app.py", line 109, in __getattr__
      return self.__getattribute__(attr)
  AttributeError: 'Application' object has no attribute 'server'
parent 1a093d76
...@@ -21,6 +21,7 @@ from .node import NodeManager ...@@ -21,6 +21,7 @@ from .node import NodeManager
class BaseApplication(object): class BaseApplication(object):
server = None
ssl = None ssl = None
def __init__(self, ssl=None, dynamic_master_list=None): def __init__(self, ssl=None, dynamic_master_list=None):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment