def get_remote_query(self): self.sesslock.acquire() try: return SessionConfigInterface.get_remote_query(self) finally: self.sesslock.release()