mirror of
https://github.com/kakwa/ldapcherry
synced 2024-11-22 01:14:21 +01:00
pep8
This commit is contained in:
parent
d4235bc33c
commit
d820cceeb6
@ -667,11 +667,12 @@ class LdapCherry(object):
|
|||||||
self.backends[b].add_user(badd[b])
|
self.backends[b].add_user(badd[b])
|
||||||
added = True
|
added = True
|
||||||
except UserAlreadyExists as e:
|
except UserAlreadyExists as e:
|
||||||
self._add_notification('User already exists in backend "' + b + '"')
|
self._add_notification(
|
||||||
|
'User already exists in backend "' + b + '"'
|
||||||
|
)
|
||||||
if not added:
|
if not added:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
|
||||||
key = self.attributes.get_key()
|
key = self.attributes.get_key()
|
||||||
username = params['attrs'][key]
|
username = params['attrs'][key]
|
||||||
sess = cherrypy.session
|
sess = cherrypy.session
|
||||||
@ -730,7 +731,9 @@ class LdapCherry(object):
|
|||||||
try:
|
try:
|
||||||
self.backends[b].set_attrs(username, badd[b])
|
self.backends[b].set_attrs(username, badd[b])
|
||||||
except UserDoesntExist as e:
|
except UserDoesntExist as e:
|
||||||
self._add_notification('User does not exist in backend "' + b + '"')
|
self._add_notification(
|
||||||
|
'User does not exist in backend "' + b + '"'
|
||||||
|
)
|
||||||
|
|
||||||
return badd
|
return badd
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user