devtools/testlib.py
changeset 9111 9c867d852067
parent 9071 46885bfa4150
child 9114 9a9d3f4bad31
equal deleted inserted replaced
9110:ed8b383d94fd 9111:9c867d852067
   222         # XXX We want to use a srv_connection instead and deprecate this
   222         # XXX We want to use a srv_connection instead and deprecate this
   223         # property
   223         # property
   224         session = self._current_session
   224         session = self._current_session
   225         if session is None:
   225         if session is None:
   226             session = self._admin_session
   226             session = self._admin_session
   227             session.set_cnx(self._admin_clt_cnx._cnxid)
   227             # bypassing all sanity to use the same repo cnx in the session we
       
   228             # can't call set_cnx as the Connection is not managed by the
       
   229             # session.
       
   230             session._Session__threaddata.cnx = self._admin_clt_cnx._cnx
   228         session.set_cnxset()
   231         session.set_cnxset()
   229         return session
   232         return session
   230 
   233 
   231     @property
   234     @property
   232     def websession(self):
   235     def websession(self):