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