--- a/server/ldaputils.py Tue Jan 21 17:34:31 2014 +0100
+++ b/server/ldaputils.py Sun Jun 16 23:36:06 2013 +0200
@@ -41,7 +41,6 @@
from cubicweb import ValidationError, AuthenticationError, Binary
from cubicweb.server import utils
-from cubicweb.server.sources import ConnectionWrapper
_ = unicode
@@ -57,6 +56,20 @@
}
+class ConnectionWrapper(object):
+ def __init__(self, cnx=None):
+ self.cnx = cnx
+ def commit(self):
+ pass
+ def rollback(self):
+ pass
+ def cursor(self):
+ return None # no actual cursor support
+ def close(self):
+ if hasattr(self.cnx, 'close'):
+ self.cnx.close()
+
+
class LDAPSourceMixIn(object):
"""a mix-in for LDAP based source"""
options = (