[multi-sources] add missing close method on ConnectionWrapper stable
authorSylvain Thénault <sylvain.thenault@logilab.fr>
Thu, 03 Mar 2011 17:50:13 +0100
branchstable
changeset 7037 6a8235456fe1
parent 7036 63386b35ec69
child 7038 fe0afc4e8ebb
[multi-sources] add missing close method on ConnectionWrapper
server/sources/__init__.py
--- a/server/sources/__init__.py	Thu Mar 03 16:05:57 2011 +0100
+++ b/server/sources/__init__.py	Thu Mar 03 17:50:13 2011 +0100
@@ -524,7 +524,9 @@
         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