kopia lustrzana https://github.com/Yakifo/amqtt
minor fixes
rodzic
848aaf8438
commit
6b03106c1c
|
@ -63,7 +63,7 @@ class PluginManager:
|
|||
self.logger.debug(" Loading plugin %s" % ep)
|
||||
plugin = ep.load(require=True)
|
||||
self.logger.debug(" Initializing plugin %s" % ep)
|
||||
obj = plugin(self)
|
||||
obj = plugin(self.context)
|
||||
return Plugin(ep.name, ep, obj)
|
||||
except ImportError as ie:
|
||||
self.logger.warn("Plugin %r import failed: %s" % (ep, ie))
|
||||
|
@ -109,7 +109,8 @@ class PluginManager:
|
|||
event_method = getattr(plugin.object, event_method_name, None)
|
||||
if event_method:
|
||||
tasks.append(self._schedule_coro(event_method(*args, **kwargs)))
|
||||
yield from asyncio.wait(tasks, loop=self._loop)
|
||||
if len(tasks) > 0:
|
||||
yield from asyncio.wait(tasks, loop=self._loop)
|
||||
|
||||
@asyncio.coroutine
|
||||
def map(self, coro, *args, **kwargs):
|
||||
|
|
Ładowanie…
Reference in New Issue