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