[repo] restore python 2.6 compatibility
authorJulien Cristau <julien.cristau@logilab.fr>
Mon, 03 Feb 2014 19:00:52 +0100
changeset 9491 e82370a30018
parent 9490 b3d2c4065e6a
child 9493 852f5ac90cd9
[repo] restore python 2.6 compatibility Broken in 12dfce15c8ea.
server/repository.py
--- a/server/repository.py	Tue Jan 28 18:24:29 2014 +0100
+++ b/server/repository.py	Mon Feb 03 19:00:52 2014 +0100
@@ -598,11 +598,12 @@
 
         This is a public method, not requiring a session id.
         """
-        with self.internal_cnx() as cnx, cnx.ensure_cnx_set:
-            # don't use cnx.execute, we don't want rset.req set
-            return self.querier.execute(cnx, 'Any K,V WHERE P is CWProperty,'
-                                        'P pkey K, P value V, NOT P for_user U',
-                                        build_descr=False)
+        with self.internal_cnx() as cnx:
+            with cnx.ensure_cnx_set:
+                # don't use cnx.execute, we don't want rset.req set
+                return self.querier.execute(cnx, 'Any K,V WHERE P is CWProperty,'
+                                            'P pkey K, P value V, NOT P for_user U',
+                                            build_descr=False)
 
     # XXX protect this method: anonymous should be allowed and registration
     # plugged