Sort loaded plugins.

This commit is contained in:
Bastian Kleineidam 2012-10-11 14:45:06 +02:00
parent 5fa8792007
commit a7036beef7

View file

@ -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: