You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "jedcunningham (via GitHub)" <gi...@apache.org> on 2023/05/18 23:25:56 UTC
[GitHub] [airflow] jedcunningham commented on a diff in pull request #31401: Fix error handling when pre-importing modules in DAGs
jedcunningham commented on code in PR #31401:
URL: https://github.com/apache/airflow/pull/31401#discussion_r1198389951
##########
airflow/utils/file.py:
##########
@@ -388,7 +388,7 @@ def iter_airflow_imports(file_path: str) -> Generator[str, None, None]:
"""Find Airflow modules imported in the given file."""
try:
parsed = ast.parse(Path(file_path).read_bytes())
- except (OSError, SyntaxError, UnicodeDecodeError):
+ except (OSError, SyntaxError, UnicodeDecodeError, ValueError):
Review Comment:
I'm not opposed to that, it is getting a little long :)
--
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