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