put back the method all_modules

even if no longer used by `_read_aliases` it is still needed in other parts of the program.
This commit is contained in:
adario7 2019-09-03 14:24:02 +02:00 committed by GitHub
parent b956e8e2a6
commit 56c3b77d0e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,16 @@ try:
except ImportError:
from configparser import RawConfigParser
def all_modules():
"""Return a list of available modules"""
result = []
path = os.path.dirname(bumblebee.modules.__file__)
for mod in [name for _, name, _ in pkgutil.iter_modules([path])]:
result.append({
"name": mod
})
return result
class Module(object):
"""Module instance base class