Commit 87e18684 authored by Garrett Regier's avatar Garrett Regier Committed by Garrett Regier

Simplify __all__ support in the Python plugin loader

No need to catch the AttributeError, instead simply
use getattr with a default value.
parent bf58b9ca
......@@ -130,13 +130,7 @@ class Hooks(object):
except KeyError:
pass
try:
keys = module.__all__
except AttributeError:
keys = module.__dict__
for key in keys:
for key in getattr(module, '__all__', module.__dict__):
value = getattr(module, key)
try:
......
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