Changeset 968
- Timestamp:
- 04/27/03 10:27:34 (22 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/ldap.py
r967 r968 21 21 # 22 22 # $Log$ 23 # Revision 1.2 2003/04/27 08:27:34 jalet 24 # connection to LDAP backend 25 # 23 26 # Revision 1.1 2003/04/27 08:04:15 jalet 24 27 # LDAP storage backend's skeleton added. DOESN'T WORK. … … 42 45 """Opens the LDAP connection.""" 43 46 raise PyKotaStorageError, "Sorry, the LDAP backend for PyKota is not yet implemented !" 47 self.closed = 1 48 try : 49 self.database = ldap.initialize(host) 50 self.database.simple_bind_s(user, passwd) 51 # TODO : dbname will be the base dn 52 except ldap.SERVER_DOWN : 53 raise PyKotaStorageError, "LDAP backend for PyKota seems to be down !" # TODO : translate 54 else : 55 self.closed = 0 44 56 45 57 def __del__(self) : 46 58 """Closes the database connection.""" 47 pass 59 if not self.closed : 60 del self.database 61 self.closed = 1 48 62 49 63 def doQuery(self, query) :