From 65207641aeadb14d7b04ea5d5d14bd5ba5313ddc Mon Sep 17 00:00:00 2001 From: Valentin Samir Date: Wed, 10 Dec 2014 16:32:53 +0100 Subject: [PATCH] =?UTF-8?q?DeprecationWarning:=20attrify=20ne=20devrait=20?= =?UTF-8?q?=C3=AAtre=20appel=C3=A9=20qu'avec=20des=20unicode?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lc_ldap.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lc_ldap.py b/lc_ldap.py index 2ce54dc..8aeea15 100644 --- a/lc_ldap.py +++ b/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