Commit 557abb55 authored by Garrett Regier's avatar Garrett Regier

Support Python plugins that define __all__

Instead of going through every local in the
plugin just check those in __all__, if defined.
parent 8b01d0c1
......@@ -131,7 +131,13 @@ class Hooks(object):
except KeyError:
for key in module.__dict__:
keys = module.__all__
except AttributeError:
keys = module.__dict__
for key in keys:
value = getattr(module, key)
......@@ -6,6 +6,9 @@ import threading
from gi.repository import GObject, Introspection, Peas
__all__ = [ 'ExtensionPythonPlugin' ]
class ExtensionPythonPlugin(GObject.Object, Peas.Activatable,
Introspection.Base, Introspection.Callable,
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment