Skip to content

Commit

Permalink
Fix bank manager constructor parameter (receive banks)
Browse files Browse the repository at this point in the history
  • Loading branch information
SrMouraSilva committed Nov 18, 2016
1 parent c7f70d1 commit 08c46ce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
11 changes: 6 additions & 5 deletions pluginsmanager/banks_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@

class BanksManager(object):
"""
:param dict data:
:param list[Bank] banks:
"""

def __init__(self, data=None):
def __init__(self, banks=None):
self.banks = []

banks = [] if banks is None else banks
self.observer_manager = ObserverManager()

data = {'banks': []} if data is None else data
#for bank_data in data['banks']:
# self.banks.append(bank_data)
for bank in banks:
self.append(bank)

def register(self, observer):
self.observer_manager.append(observer)
Expand Down
1 change: 0 additions & 1 deletion pluginsmanager/mod_host/mod_host.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,5 +105,4 @@ def on_connection_updated(self, connection, update_type, token=None):
if update_type == UpdateType.CREATED:
self.host.connect(connection)
elif update_type == UpdateType.DELETED:
print('deleting', connection)
self.host.disconnect(connection)

0 comments on commit 08c46ce

Please sign in to comment.