devtools/testlib.py
branchstable
changeset 5786 7c16a4e7a592
parent 5785 c0661b963ced
child 5811 e77cea9721e7
child 5813 0b250d72fcfa
equal deleted inserted replaced
5785:c0661b963ced 5786:7c16a4e7a592
   333             self.cnx.anonymous_connection = True
   333             self.cnx.anonymous_connection = True
   334         return self.cnx
   334         return self.cnx
   335 
   335 
   336     def restore_connection(self):
   336     def restore_connection(self):
   337         if not self.cnx is self._orig_cnx[0]:
   337         if not self.cnx is self._orig_cnx[0]:
   338             if not cnx._closed:
   338             if not self.cnx._closed:
   339                 self.cnx.close()
   339                 self.cnx.close()
   340             try:
   340             try:
   341                 self._cnxs.remove(self.cnx)
   341                 self._cnxs.remove(self.cnx)
   342             except ValueError:
   342             except ValueError:
   343                 pass
   343                 pass