You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2022/06/10 10:10:52 UTC

[GitHub] [airflow] basjacobs93 commented on a diff in pull request #24368: Fix requirements.txt path in Python operator

basjacobs93 commented on code in PR #24368:
URL: https://github.com/apache/airflow/pull/24368#discussion_r894372253


##########
airflow/operators/python.py:
##########
@@ -408,7 +408,8 @@ def __init__(
         if not requirements:
             self.requirements: Union[List[str], str] = []
         elif isinstance(requirements, str):
-            self.requirements = requirements
+            with open(requirements, "r") as file:
+                self.requirements = file.readlines()

Review Comment:
   Thanks, I was not aware of that. I have moved the reading of the file to `execute_callable()`



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org