def get_mode(self): self.dllock.acquire() try: return DownloadConfigInterface.get_mode(self) finally: self.dllock.release()