feluelle commented on a change in pull request #6574: [AIRFLOW-5924] 
Automatically unify bucket name and key in S3Hook
URL: https://github.com/apache/airflow/pull/6574#discussion_r354314569
 
 

 ##########
 File path: airflow/providers/amazon/aws/hooks/s3.py
 ##########
 @@ -36,24 +37,48 @@
 def provide_bucket_name(func):
     """
     Function decorator that provides a bucket name taken from the connection
-    in case no bucket name has been passed to the function and, if available, 
also no key has been passed.
+    in case no bucket name has been passed to the function.
     """
 
     @wraps(func)
     def wrapper(*args, **kwargs):
-        func_params = func.__code__.co_varnames
+        bound_args = signature(func).bind(*args, **kwargs)
 
 Review comment:
   Good point!

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to