jedcunningham commented on code in PR #46253:
URL: https://github.com/apache/airflow/pull/46253#discussion_r1938675358


##########
airflow/dag_processing/bundles/git.py:
##########
@@ -156,10 +156,14 @@ def initialize(self) -> None:
     def _clone_repo_if_required(self) -> None:
         if not os.path.exists(self.repo_path):
             self.log.info("Cloning repository to %s from %s", self.repo_path, 
self.bare_repo_path)
-            Repo.clone_from(
-                url=self.bare_repo_path,
-                to_path=self.repo_path,
-            )
+            try:
+                Repo.clone_from(
+                    url=self.bare_repo_path,
+                    to_path=self.repo_path,
+                )
+            except NoSuchPathError as e:
+                # Protection should the bare repo be removed manually
+                raise AirflowException("Repository path: %s not found: %s", 
self.bare_repo_path, e)

Review Comment:
   ```suggestion
                   raise AirflowException("Repository path: %s not found", 
self.bare_repo_path) from e
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to