From 65cbe183ea9e8869ff78aec588d98b5fd79d3a3d Mon Sep 17 00:00:00 2001 From: Kload Date: Sat, 8 Jun 2013 10:33:47 +0200 Subject: [PATCH] identation fix -_- --- yunohost_user.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/yunohost_user.py b/yunohost_user.py index a1a0558d..5f70736b 100644 --- a/yunohost_user.py +++ b/yunohost_user.py @@ -93,7 +93,7 @@ def user_create(username, firstname, lastname, mail, password): #if not os.system("getent passwd " + username): # raise YunoHostError(17, _("Username not available")) - if mail[mail.find('@')+1:] not in domain_list()['Domains']: + if mail[mail.find('@')+1:] not in domain_list()['Domains']: raise YunoHostError(22, _("Domain not found : ")+ mail[mail.find('@')+1:]) # Get random UID/GID @@ -189,7 +189,7 @@ def user_update(username, firstname=None, lastname=None, mail=None, change_passw with YunoHostLDAP() as yldap: attrs_to_fetch = ['givenName', 'sn', 'mail', 'maildrop'] new_attr_dict = {} - domains = domain_list()['Domains'] + domains = domain_list()['Domains'] # Populate user informations result = yldap.search(base='ou=users,dc=yunohost,dc=org', filter='uid=' + username, attrs=attrs_to_fetch) @@ -217,7 +217,7 @@ def user_update(username, firstname=None, lastname=None, mail=None, change_passw if mail: yldap.validate_uniqueness({ 'mail': mail }) - if mail[mail.find('@')+1:] not in domains: + if mail[mail.find('@')+1:] not in domains: raise YunoHostError(22, _("Domain not found : ")+ mail[mail.find('@')+1:]) del user['mail'][0] new_attr_dict['mail'] = [mail] + user['mail'] @@ -227,7 +227,7 @@ def user_update(username, firstname=None, lastname=None, mail=None, change_passw add_mailalias = [ add_mailalias ] for mail in add_mailalias: yldap.validate_uniqueness({ 'mail': mail }) - if mail[mail.find('@')+1:] not in domains: + if mail[mail.find('@')+1:] not in domains: raise YunoHostError(22, _("Domain not found : ")+ mail[mail.find('@')+1:]) user['mail'].append(mail) new_attr_dict['mail'] = user['mail']