mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-01-28 08:03:36 +00:00
Move all modules from 'modules/installed' to 'modules' directory
This commit is contained in:
parent
912c5022ca
commit
37206f1e83
@ -1 +1 @@
|
||||
../installed/apps/
|
||||
../apps/
|
||||
@ -1 +1 @@
|
||||
../installed/config/
|
||||
../config/
|
||||
@ -1 +1 @@
|
||||
../installed/diagnostics/
|
||||
../diagnostics/
|
||||
@ -1 +1 @@
|
||||
../installed/expert_mode/
|
||||
../expert_mode/
|
||||
@ -1 +1 @@
|
||||
../installed/firewall/
|
||||
../firewall/
|
||||
@ -1 +1 @@
|
||||
../installed/first_boot/
|
||||
../first_boot/
|
||||
@ -1 +1 @@
|
||||
../installed/help/
|
||||
../help/
|
||||
@ -1 +1 @@
|
||||
../installed/lib/
|
||||
../lib/
|
||||
@ -1 +1 @@
|
||||
../installed/owncloud/
|
||||
../owncloud/
|
||||
@ -1 +1 @@
|
||||
../installed/packages/
|
||||
../packages/
|
||||
@ -1 +1 @@
|
||||
../installed/pagekite/
|
||||
../pagekite/
|
||||
@ -1 +1 @@
|
||||
../installed/system/
|
||||
../system/
|
||||
@ -1 +1 @@
|
||||
../installed/tor/
|
||||
../tor/
|
||||
@ -1 +1 @@
|
||||
../installed/users/
|
||||
../users/
|
||||
@ -1 +1 @@
|
||||
../installed/xmpp/
|
||||
../xmpp/
|
||||
12
plinth.py
12
plinth.py
@ -80,16 +80,15 @@ class Root(plugin_mount.PagePlugin):
|
||||
def load_modules():
|
||||
"""
|
||||
Read names of enabled modules in modules/enabled directory and
|
||||
import them from modules/installed directory.
|
||||
import them from modules directory.
|
||||
"""
|
||||
for name in os.listdir('modules/enabled'):
|
||||
cfg.log.info('Importing modules/installed/%s' % name)
|
||||
cfg.log.info('Importing modules/%s' % name)
|
||||
try:
|
||||
importlib.import_module(
|
||||
'modules.installed.{module}'.format(module=name))
|
||||
importlib.import_module('modules.{module}'.format(module=name))
|
||||
except ImportError as exception:
|
||||
cfg.log.error(
|
||||
'Could not import modules/installed/{module}: {exception}'
|
||||
'Could not import modules/{module}: {exception}'
|
||||
.format(module=name, exception=exception))
|
||||
|
||||
|
||||
@ -100,8 +99,7 @@ def get_template_directories():
|
||||
|
||||
directories = set((core_directory,))
|
||||
for name in os.listdir('modules/enabled'):
|
||||
directories.add(os.path.join('modules', 'installed', name,
|
||||
'templates'))
|
||||
directories.add(os.path.join('modules', name, 'templates'))
|
||||
|
||||
cfg.log.info('Template directories - %s' % directories)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user