You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by hu...@apache.org on 2023/11/29 13:36:18 UTC
(airflow) branch main updated: Remove setting a non-existing object param and use local var instead in S3Hook (#35950)
This is an automated email from the ASF dual-hosted git repository.
husseinawala pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 9ab343714a Remove setting a non-existing object param and use local var instead in S3Hook (#35950)
9ab343714a is described below
commit 9ab343714ac80128830e2012b54530f381646329
Author: Hussein Awala <hu...@awala.fr>
AuthorDate: Wed Nov 29 15:36:09 2023 +0200
Remove setting a non-existing object param and use local var instead in S3Hook (#35950)
---
airflow/providers/amazon/aws/hooks/s3.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/airflow/providers/amazon/aws/hooks/s3.py b/airflow/providers/amazon/aws/hooks/s3.py
index ad25c5b5c5..72ef1cb292 100644
--- a/airflow/providers/amazon/aws/hooks/s3.py
+++ b/airflow/providers/amazon/aws/hooks/s3.py
@@ -805,7 +805,7 @@ class S3Hook(AwsBaseHook):
_prefix = _original_prefix.split("*", 1)[0] if _apply_wildcard else _original_prefix
delimiter = delimiter or ""
start_after_key = start_after_key or ""
- self.object_filter_usr = object_filter
+ object_filter_usr = object_filter
config = {
"PageSize": page_size,
"MaxItems": max_items,
@@ -827,8 +827,8 @@ class S3Hook(AwsBaseHook):
if _apply_wildcard:
new_keys = (k for k in new_keys if fnmatch.fnmatch(k["Key"], _original_prefix))
keys.extend(new_keys)
- if self.object_filter_usr is not None:
- return self.object_filter_usr(keys, from_datetime, to_datetime)
+ if object_filter_usr is not None:
+ return object_filter_usr(keys, from_datetime, to_datetime)
return self._list_key_object_filter(keys, from_datetime, to_datetime)