Don't call internal methods on ArchiveProduct

This commit is contained in:
XANTRONIX Industrial 2025-02-15 17:25:44 -05:00
parent 45a5ef6cbd
commit 29372d9661

View file

@ -49,7 +49,7 @@ class ArchiveProduct():
return ret return ret
def __path__(self): def path(self):
parts = self.__parts__() parts = self.__parts__()
ret = os.path.join(*parts) ret = os.path.join(*parts)
@ -60,6 +60,9 @@ class ArchiveProduct():
return ret return ret
def key(self):
return str(self)
@staticmethod @staticmethod
def from_s3_key(key: str): def from_s3_key(key: str):
product = ArchiveProduct() product = ArchiveProduct()
@ -82,7 +85,7 @@ class ArchiveProduct():
return product return product
def is_downloaded(self, path: str): def is_downloaded(self, path: str):
return os.path.isfile(os.path.join(path, self.__path__())) return os.path.isfile(os.path.join(path, self.path()))
def is_reported(self, db: Database): def is_reported(self, db: Database):
sql = """select count(( sql = """select count((