From 62a3c9f67e03fd6c6e819f5b37ccb1d51212505b Mon Sep 17 00:00:00 2001 From: ErnestaP Date: Mon, 9 Oct 2023 07:52:32 +0100 Subject: [PATCH] replace -> lstrip --- dags/elsevier/repository.py | 2 +- dags/iop/repository.py | 2 +- dags/springer/repository.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dags/elsevier/repository.py b/dags/elsevier/repository.py index a5bb0e0a..df95f4de 100644 --- a/dags/elsevier/repository.py +++ b/dags/elsevier/repository.py @@ -17,7 +17,7 @@ def __init__(self) -> None: def get_all_raw_filenames(self): return [ - f.key.replace("raw/", "") + f.key.lstrip("raw/") for f in self.s3.objects.filter(Prefix=self.ZIPED_DIR).all() ] diff --git a/dags/iop/repository.py b/dags/iop/repository.py index 0952bcd5..7519f43a 100644 --- a/dags/iop/repository.py +++ b/dags/iop/repository.py @@ -17,7 +17,7 @@ def __init__(self) -> None: def get_all_raw_filenames(self): return [ - f.key.replace("raw/", "") + f.key.lstrip("raw/") for f in self.s3.objects.filter(Prefix=self.ZIPED_DIR).all() ] diff --git a/dags/springer/repository.py b/dags/springer/repository.py index a0138e0c..d55a644a 100644 --- a/dags/springer/repository.py +++ b/dags/springer/repository.py @@ -16,7 +16,7 @@ def __init__(self) -> None: def get_all_raw_filenames(self): return [ - f.key.replace("raw/", "") + f.key.lstrip("raw/") for f in self.s3.objects.filter(Prefix=self.ZIPED_DIR).all() ]