Rename 'etc' folder and move yunohost into a separate package

This commit is contained in:
Jerome Lebleu 2014-02-24 19:11:09 +01:00
parent e6dd0ab4e9
commit 2b370be233
18 changed files with 12 additions and 12 deletions

View file

@ -7,7 +7,7 @@ import os
session_path = '/var/cache/yunohost/session' session_path = '/var/cache/yunohost/session'
# Path of the actions map definition(s) # Path of the actions map definition(s)
actionsmap_path = os.path.dirname(__file__) +'/../../etc/actionsmap' actionsmap_path = os.path.dirname(__file__) +'/../../data/actionsmap'
# Path for the actions map cache # Path for the actions map cache
actionsmap_cache_path = '/var/cache/yunohost/actionsmap' actionsmap_cache_path = '/var/cache/yunohost/actionsmap'

View file

@ -298,7 +298,7 @@ class ActionsMap(object):
function = '%s_%s' % (category, action) function = '%s_%s' % (category, action)
try: try:
mod = __import__(module, globals=globals(), fromlist=[function], level=2) mod = __import__(module, globals=globals(), fromlist=[function], level=0)
func = getattr(mod, function) func = getattr(mod, function)
except (AttributeError, ImportError): except (AttributeError, ImportError):
raise YunoHostError(168, _('Function is not defined')) raise YunoHostError(168, _('Function is not defined'))

View file

@ -37,7 +37,7 @@ from domain import domain_list, domain_add
from user import user_info, user_list from user import user_info, user_list
from hook import hook_exec, hook_add, hook_remove from hook import hook_exec, hook_add, hook_remove
from ..core.helpers import YunoHostError, YunoHostLDAP, win_msg, random_password, is_true, validate from .moulinette.core.helpers import YunoHostError, YunoHostLDAP, win_msg, random_password, is_true, validate
repo_path = '/var/cache/yunohost/repo' repo_path = '/var/cache/yunohost/repo'
apps_path = '/usr/share/yunohost/apps' apps_path = '/usr/share/yunohost/apps'

View file

@ -29,7 +29,7 @@ import json
import yaml import yaml
import glob import glob
from ..core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, win_msg from moulinette.core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, win_msg
def backup_init(helper=False): def backup_init(helper=False):
""" """

View file

@ -34,7 +34,7 @@ import requests
from urllib import urlopen from urllib import urlopen
from dyndns import dyndns_subscribe from dyndns import dyndns_subscribe
from ..core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize, validate, get_required_args from moulinette.core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize, validate, get_required_args
def domain_list(filter=None, limit=None, offset=None): def domain_list(filter=None, limit=None, offset=None):

View file

@ -30,7 +30,7 @@ import json
import glob import glob
import base64 import base64
from ..core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, win_msg from moulinette.core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, win_msg
def dyndns_subscribe(subscribe_host="dyndns.yunohost.org", domain=None, key=None): def dyndns_subscribe(subscribe_host="dyndns.yunohost.org", domain=None, key=None):
""" """

View file

@ -37,7 +37,7 @@ except ImportError:
sys.stderr.write('apt-get install python-yaml\n') sys.stderr.write('apt-get install python-yaml\n')
sys.exit(1) sys.exit(1)
from ..core.helpers import YunoHostError, win_msg from moulinette.core.helpers import YunoHostError, win_msg
def firewall_allow(protocol=None, port=None, ipv6=None, upnp=False): def firewall_allow(protocol=None, port=None, ipv6=None, upnp=False):

View file

@ -28,7 +28,7 @@ import sys
import re import re
import json import json
from ..core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize from moulinette.core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize
hook_folder = '/usr/share/yunohost/hooks/' hook_folder = '/usr/share/yunohost/hooks/'

View file

@ -37,7 +37,7 @@ from datetime import datetime, timedelta
from service import (service_enable, service_disable, from service import (service_enable, service_disable,
service_start, service_stop, service_status) service_start, service_stop, service_status)
from ..core.helpers import YunoHostError, win_msg from moulinette.core.helpers import YunoHostError, win_msg
glances_uri = 'http://127.0.0.1:61209' glances_uri = 'http://127.0.0.1:61209'
stats_path = '/var/lib/yunohost/stats' stats_path = '/var/lib/yunohost/stats'

View file

@ -28,7 +28,7 @@ import glob
import subprocess import subprocess
import os.path import os.path
from ..core.helpers import YunoHostError, win_msg from moulinette.core.helpers import YunoHostError, win_msg
def service_start(names): def service_start(names):

View file

@ -36,7 +36,7 @@ from dyndns import dyndns_subscribe
from backup import backup_init from backup import backup_init
from app import app_ssowatconf from app import app_ssowatconf
from ..core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, get_required_args, win_msg from moulinette.core.helpers import YunoHostError, YunoHostLDAP, validate, colorize, get_required_args, win_msg
def tools_ldapinit(password=None): def tools_ldapinit(password=None):

View file

@ -33,7 +33,7 @@ import getpass
from domain import domain_list from domain import domain_list
from hook import hook_callback from hook import hook_callback
from ..core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize, validate, get_required_args from moulinette.core.helpers import YunoHostError, YunoHostLDAP, win_msg, colorize, validate, get_required_args
def user_list(fields=None, filter=None, limit=None, offset=None): def user_list(fields=None, filter=None, limit=None, offset=None):
""" """