manager.notify() doesn't handle the NotImplementedError exceptions

In case a manager doesn't implement the method doOnEvent() the
NotImplementedError exception is raised. The manager.notify()
doesn't handle such exceptions and fails. This fix solves the problem.

Bug: #1690117
Change-Id: I005658c4341106b54f6757ee4dfcca08a2405605
Sem-Ver: bugfix
This commit is contained in:
Lisa Zangrando 2017-05-11 12:22:53 +02:00
parent 16d1843455
commit a2ba511da3
1 changed files with 5 additions and 2 deletions

View File

@ -59,8 +59,11 @@ class Manager(SynergyObject, Thread):
*args, **kargs)
else:
for manager in self.managers.values():
if manager.getName() != manager_name:
manager.doOnEvent(event_type, *args, **kargs)
if manager.getName() != self.getName():
try:
manager.doOnEvent(event_type, *args, **kargs)
except NotImplementedError:
pass
def getOptions(self):
return self.config_opts