code: def reopen(self):
          
          try:
              self._con.reopen()
          except Exception:
              if self._transcation:
                  self._transaction = False
                  try:
                      self._con.query('rollback')
                  except Exception:
                      pass
          else:
              self._transaction = False
              self._closed = False
              self._setsession()
              self._usage = 0
docs: Reopen the tough connection.
  
          It will not complain if the connection cannot be reopened.