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