Add return value to Notify
This commit is contained in:
parent
01099e9f2c
commit
a5fa053815
|
@ -46,4 +46,5 @@ class INetwork(ABC):
|
|||
def notify(self, notifee):
|
||||
"""
|
||||
:param notifee: object implementing Notifee interface
|
||||
:return: true if notifee registered successfully, false otherwise
|
||||
"""
|
||||
|
|
|
@ -175,9 +175,12 @@ class Swarm(INetwork):
|
|||
def notify(self, notifee):
|
||||
"""
|
||||
:param notifee: object implementing Notifee interface
|
||||
:return: true if notifee registered successfully, false otherwise
|
||||
"""
|
||||
if isinstance(notifee, INotifee):
|
||||
self.notifees.append(notifee)
|
||||
return True
|
||||
return False
|
||||
|
||||
def add_transport(self, transport):
|
||||
# TODO: Support more than one transport
|
||||
|
|
Loading…
Reference in New Issue
Block a user