Move all modules from 'modules/installed' to 'modules' directory

This commit is contained in:
Sunil Mohan Adapa 2014-06-06 12:14:17 +05:30
parent 912c5022ca
commit 37206f1e83
72 changed files with 20 additions and 22 deletions

View File

@ -1 +1 @@
../installed/apps/
../apps/

View File

@ -1 +1 @@
../installed/config/
../config/

View File

@ -1 +1 @@
../installed/diagnostics/
../diagnostics/

View File

@ -1 +1 @@
../installed/expert_mode/
../expert_mode/

View File

@ -1 +1 @@
../installed/firewall/
../firewall/

View File

@ -1 +1 @@
../installed/first_boot/
../first_boot/

View File

@ -1 +1 @@
../installed/help/
../help/

View File

@ -1 +1 @@
../installed/lib/
../lib/

View File

@ -1 +1 @@
../installed/owncloud/
../owncloud/

View File

@ -1 +1 @@
../installed/packages/
../packages/

View File

@ -1 +1 @@
../installed/pagekite/
../pagekite/

View File

@ -1 +1 @@
../installed/system/
../system/

View File

@ -1 +1 @@
../installed/tor/
../tor/

View File

@ -1 +1 @@
../installed/users/
../users/

View File

@ -1 +1 @@
../installed/xmpp/
../xmpp/

View File

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