Drop dictionary construction on get_plugin
No point in building a dictionary of weakrefs when just retrieving one plugin. TrivialFix Change-Id: I7f9e8494dec74f18ae6a57a8ffdf42570102dc3c
This commit is contained in:
parent
0c87c3b7c8
commit
d4f4ab2c67
@ -38,7 +38,8 @@ class _PluginDirectory(object):
|
||||
|
||||
def get_plugin(self, alias):
|
||||
"""Get a plugin for a given alias or None if not present."""
|
||||
return self.plugins.get(alias)
|
||||
p = self._plugins.get(alias)
|
||||
return weakref.proxy(p) if p else None
|
||||
|
||||
@property
|
||||
def plugins(self):
|
||||
|
Loading…
Reference in New Issue
Block a user