DeprecationWarning: attrify ne devrait être appelé qu'avec des unicode
This commit is contained in:
parent
58f7861c19
commit
65207641ae
1 changed files with 5 additions and 5 deletions
10
lc_ldap.py
10
lc_ldap.py
|
@ -342,7 +342,7 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object):
|
|||
uldif['mid'] = [ unicode(self._find_id('mid', lockId=lockId)) ]
|
||||
|
||||
# Tout doit disparaître !!
|
||||
machine = self._create_entity('mid=%s,%s' % (uldif['mid'][0], parent), uldif, lockId)
|
||||
machine = self._create_entity(u'mid=%s,%s' % (uldif['mid'][0], parent), uldif, lockId)
|
||||
machine.__enter__()
|
||||
if machine.may_be(variables.created, self.droits + self._check_parent(machine.dn)):
|
||||
yield machine
|
||||
|
@ -363,7 +363,7 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object):
|
|||
try:
|
||||
aid = uldif.setdefault('aid', [ unicode(self._find_id('aid', lockId=lockId)) ])
|
||||
uldif['objectClass'] = [u'adherent']
|
||||
adherent = self._create_entity('aid=%s,%s' % (aid[0], variables.base_dn), uldif, lockId)
|
||||
adherent = self._create_entity(u'aid=%s,%s' % (aid[0], variables.base_dn), uldif, lockId)
|
||||
adherent.__enter__()
|
||||
if adherent.may_be(variables.created, self.droits):
|
||||
yield adherent
|
||||
|
@ -384,7 +384,7 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object):
|
|||
try:
|
||||
cid = uldif.setdefault('cid', [ unicode(self._find_id('cid', lockId=lockId)) ])
|
||||
uldif['objectClass'] = [u'club']
|
||||
club = self._create_entity('cid=%s,%s' % (cid[0], variables.base_dn), uldif, lockId)
|
||||
club = self._create_entity(u'cid=%s,%s' % (cid[0], variables.base_dn), uldif, lockId)
|
||||
club.__enter__()
|
||||
if club.may_be(variables.created, self.droits):
|
||||
yield club
|
||||
|
@ -406,7 +406,7 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object):
|
|||
# fid
|
||||
uldif['fid'] = [ unicode(self._find_id('fid', lockId=lockId)) ]
|
||||
uldif['objectClass'] = [u'facture']
|
||||
facture = self._create_entity('fid=%s,%s' % (uldif['fid'][0], parent), uldif, lockId)
|
||||
facture = self._create_entity(u'fid=%s,%s' % (uldif['fid'][0], parent), uldif, lockId)
|
||||
facture.__enter__()
|
||||
if facture.may_be(variables.created, self.droits + self._check_parent(facture.dn)):
|
||||
yield facture
|
||||
|
@ -429,7 +429,7 @@ class lc_ldap(ldap.ldapobject.LDAPObject, object):
|
|||
# xid
|
||||
uldif['xid'] = [ unicode(self._find_id('xid', lockId=lockId)) ]
|
||||
uldif['objectClass'] = [u'baseCert']
|
||||
baseCert = self._create_entity('xid=%s,%s' % (uldif['xid'][0], parent), uldif, lockId)
|
||||
baseCert = self._create_entity(u'xid=%s,%s' % (uldif['xid'][0], parent), uldif, lockId)
|
||||
baseCert.__enter__()
|
||||
if baseCert.may_be(variables.created, self.droits + self._check_parent(baseCert.dn)):
|
||||
yield baseCert
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue