Skip to content

Commit 62678f9

Browse files
authored
EmptyOperator raises InvalidURL for non-existing logs (#50325)
1 parent c5dfb11 commit 62678f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

airflow-core/src/airflow/utils/log/file_task_handler.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -607,9 +607,9 @@ def _read_from_logs_server(self, ti, worker_log_rel_path) -> tuple[LogSourceInfo
607607
sources.append(url)
608608
logs.append(response.text)
609609
except Exception as e:
610-
from requests.exceptions import InvalidSchema
610+
from requests.exceptions import InvalidURL
611611

612-
if isinstance(e, InvalidSchema) and ti.task.inherits_from_empty_operator is True:
612+
if isinstance(e, InvalidURL) and ti.task.inherits_from_empty_operator is True:
613613
sources.append(self.inherits_from_empty_operator_log_message)
614614
else:
615615
sources.append(f"Could not read served logs: {e}")

0 commit comments

Comments
 (0)