# HG changeset patch # User Sylvain Thénault # Date 1371418566 -7200 # Node ID 18a186b029706aaa9c2229462c6e3f96161de0d7 # Parent 65d93a4fd11c315dfb680dfb02b0d3b20831e773 [multi-sources-removal] Move cw.server.sources.ConnectionWrapper where it belongs It's only used by the ldap utilities. Related to #2919300 diff -r 65d93a4fd11c -r 18a186b02970 server/ldaputils.py --- 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 = ( diff -r 65d93a4fd11c -r 18a186b02970 server/sources/__init__.py --- a/server/sources/__init__.py Tue Jan 21 17:34:31 2014 +0100 +++ b/server/sources/__init__.py Sun Jun 16 23:36:06 2013 +0200 @@ -532,19 +532,6 @@ -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() - from cubicweb.server import SOURCE_TYPES def source_adapter(source_type):