mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Fix misc typo and forgotten m18n.n
This commit is contained in:
parent
24cf090221
commit
07ffe6f592
3 changed files with 4 additions and 6 deletions
|
@ -2164,7 +2164,7 @@ def backup_list(with_info=False, human_readable=False):
|
|||
for a in result:
|
||||
try:
|
||||
d[a] = backup_info(a, human_readable=human_readable)
|
||||
except YunohostError, e:
|
||||
except YunohostError as e:
|
||||
logger.warning('%s: %s' % (a, e.strerror))
|
||||
|
||||
result = d
|
||||
|
|
|
@ -144,8 +144,7 @@ def user_create(operation_logger, auth, username, firstname, lastname, mail, pas
|
|||
|
||||
# Check that the mail domain exists
|
||||
if mail.split("@")[1] not in domain_list(auth)['domains']:
|
||||
raise YunohostError(m18n.n('mail_domain_unknown',
|
||||
domain=mail.split("@")[1]))
|
||||
raise YunohostError('mail_domain_unknown', domain=mail.split("@")[1])
|
||||
|
||||
operation_logger.start()
|
||||
|
||||
|
@ -323,8 +322,7 @@ def user_update(operation_logger, auth, username, firstname=None, lastname=None,
|
|||
]
|
||||
auth.validate_uniqueness({'mail': mail})
|
||||
if mail[mail.find('@') + 1:] not in domains:
|
||||
raise YunohostError(m18n.n('mail_domain_unknown',
|
||||
domain=mail[mail.find('@') + 1:]))
|
||||
raise YunohostError('mail_domain_unknown', domain=mail[mail.find('@') + 1:])
|
||||
if mail in aliases:
|
||||
raise YunohostError('mail_unavailable')
|
||||
|
||||
|
|
|
@ -91,7 +91,7 @@ class PasswordValidator(object):
|
|||
|
||||
status, msg = self.validation_summary(password)
|
||||
if status == "error":
|
||||
raise YunohostError(1, m18n.n(msg))
|
||||
raise YunohostError(msg)
|
||||
|
||||
def validation_summary(self, password):
|
||||
"""
|
||||
|
|
Loading…
Add table
Reference in a new issue