Add return value to Notify
This commit is contained in:
parent
d800b3ef41
commit
7d45131f37
|
@ -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