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:
parent
b956e8e2a6
commit
56c3b77d0e
1 changed files with 10 additions and 0 deletions
|
@ -16,6 +16,16 @@ try:
|
||||||
except ImportError:
|
except ImportError:
|
||||||
from configparser import RawConfigParser
|
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):
|
class Module(object):
|
||||||
"""Module instance base class
|
"""Module instance base class
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue