Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jed Cunningham <[email protected]>
  • Loading branch information
ephraimbuddy and jedcunningham authored Jan 30, 2025
1 parent 88e028d commit 51202c3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions airflow/dag_processing/bundles/git.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def _clone_repo_if_required(self) -> None:
to_path=self.repo_path,
)
except NoSuchPathError as e:
# Protection should the path be removed manually
# Protection should the bare repo be removed manually
raise AirflowException("Repository path: %s not found: %s", self.bare_repo_path, e)

self.repo = Repo(self.repo_path)
Expand All @@ -177,8 +177,7 @@ def _clone_bare_repo_if_required(self) -> None:
except GitCommandError as e:
# log the error to appear in dag-processor stdout and raise exception to appear
# in the dag-processor logs
self.log.info("Error cloning repository %s: %s", self.repo_url, e)
raise AirflowException("Error cloning repository: %s", e)
raise AirflowException("Error cloning repository") from e
self.bare_repo = Repo(self.bare_repo_path)

def _ensure_version_in_bare_repo(self) -> None:
Expand Down

0 comments on commit 51202c3

Please sign in to comment.