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