Skip to content

Commit

Permalink
Remove setting a non-existing object param and use local var instead …
Browse files Browse the repository at this point in the history
…in S3Hook (apache#35950)
  • Loading branch information
hussein-awala authored Nov 29, 2023
1 parent 98aa84b commit 9ab3437
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions airflow/providers/amazon/aws/hooks/s3.py
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ def _is_in_period(input_date: datetime) -> bool:
_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,
Expand All @@ -827,8 +827,8 @@ def _is_in_period(input_date: datetime) -> bool:
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)

Expand Down

0 comments on commit 9ab3437

Please sign in to comment.