Sort loaded plugins.
This commit is contained in:
parent
5fa8792007
commit
a7036beef7
1 changed files with 2 additions and 2 deletions
|
@ -24,7 +24,7 @@ def get_importable_modules(folder):
|
|||
@return module filenames
|
||||
@rtype: iterator of string
|
||||
"""
|
||||
for fname in os.listdir(folder):
|
||||
for fname in sorted(os.listdir(folder)):
|
||||
if fname.endswith('.py') and not fname.startswith('_'):
|
||||
yield os.path.join(folder, fname)
|
||||
|
||||
|
@ -62,7 +62,7 @@ def get_module_plugins(module, classobj):
|
|||
names = module.__all__
|
||||
except AttributeError:
|
||||
names = [x for x in vars(module) if not x.startswith('_')]
|
||||
for name in names:
|
||||
for name in sorted(names):
|
||||
try:
|
||||
obj = getattr(module, name)
|
||||
except AttributeError:
|
||||
|
|
Loading…
Reference in a new issue