mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
corrections
This commit is contained in:
parent
9eec09da81
commit
410e757732
3 changed files with 7 additions and 9 deletions
|
@ -1296,7 +1296,7 @@ def app_checkurl(auth, url, app=None):
|
|||
raise MoulinetteError('app_location_already_used', app=a["id"], path=path)
|
||||
# can't install "/a/b/" if "/a/" exists
|
||||
elif path.startswith(p) or p.startswith(path):
|
||||
raise MoulinetteError('app_location_install_failed', other_path=p, other_app=a['id'))
|
||||
raise MoulinetteError('app_location_install_failed', other_path=p, other_app=a['id'])
|
||||
|
||||
if app is not None and not installed:
|
||||
app_setting(app, 'domain', value=domain)
|
||||
|
@ -1618,7 +1618,7 @@ def app_config_apply(app, args):
|
|||
|
||||
installed = _is_installed(app)
|
||||
if not installed:
|
||||
raise MoulinetteError('app_not_installed', app=app_id)
|
||||
raise MoulinetteError('app_not_installed', app=app)
|
||||
|
||||
config_panel = os.path.join(APPS_SETTING_PATH, app, 'config_panel.json')
|
||||
config_script = os.path.join(APPS_SETTING_PATH, app, 'scripts', 'config')
|
||||
|
|
|
@ -127,8 +127,7 @@ def dyndns_subscribe(operation_logger, subscribe_host="dyndns.yunohost.org", dom
|
|||
|
||||
# Verify if domain is provided by subscribe_host
|
||||
if not _dyndns_provides(subscribe_host, domain):
|
||||
raise MoulinetteError(m18n.n('dyndns_domain_not_provided',
|
||||
domain=domain, provider=subscribe_host))
|
||||
raise MoulinetteError('dyndns_domain_not_provided', domain=domain, provider=subscribe_host)
|
||||
|
||||
# Verify if domain is available
|
||||
if not _dyndns_available(subscribe_host, domain):
|
||||
|
|
|
@ -71,7 +71,7 @@ def user_list(auth, fields=None):
|
|||
if attr in keys:
|
||||
attrs.append(attr)
|
||||
else:
|
||||
raise MoulinetteError('field_invalid', attrz1)
|
||||
raise MoulinetteError('field_invalid', attr)
|
||||
else:
|
||||
attrs = ['uid', 'cn', 'mail', 'mailuserquota', 'loginShell']
|
||||
|
||||
|
@ -140,7 +140,7 @@ def user_create(operation_logger, auth, username, firstname, lastname, mail, pas
|
|||
]
|
||||
|
||||
if mail in aliases:
|
||||
raise MoulinetteError(errno.EEXIST,m18n.n('mail_unavailable'))
|
||||
raise MoulinetteError('mail_unavailable')
|
||||
|
||||
# Check that the mail domain exists
|
||||
if mail.split("@")[1] not in domain_list(auth)['domains']:
|
||||
|
@ -326,7 +326,7 @@ def user_update(operation_logger, auth, username, firstname=None, lastname=None,
|
|||
raise MoulinetteError(m18n.n('mail_domain_unknown',
|
||||
domain=mail[mail.find('@') + 1:]))
|
||||
if mail in aliases:
|
||||
raise MoulinetteError(errno.EEXIST,m18n.n('mail_unavailable'))
|
||||
raise MoulinetteError('mail_unavailable')
|
||||
|
||||
del user['mail'][0]
|
||||
new_attr_dict['mail'] = [mail] + user['mail']
|
||||
|
@ -337,8 +337,7 @@ def user_update(operation_logger, auth, username, firstname=None, lastname=None,
|
|||
for mail in add_mailalias:
|
||||
auth.validate_uniqueness({'mail': mail})
|
||||
if mail[mail.find('@') + 1:] not in domains:
|
||||
raise MoulinetteError(m18n.n('mail_domain_unknown',
|
||||
domain=mail[mail.find('@') + 1:]))
|
||||
raise MoulinetteError('mail_domain_unknown', domain=mail[mail.find('@') + 1:])
|
||||
user['mail'].append(mail)
|
||||
new_attr_dict['mail'] = user['mail']
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue