Skip to content

Commit

Permalink
Add warning when patch file isn't found (closes dfetch-org#191)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeudens committed Jul 8, 2021
1 parent 2125327 commit e4053de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dfetch/project/vcs.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,11 @@ def update(self, force: bool = False) -> None:
actually_fetched = self._fetch_impl(to_fetch)
self._log_project(f"Fetched {actually_fetched}")

if self.__project.patch and os.path.exists(self.__project.patch):
self.apply_patch()
if self.__project.patch:
if os.path.exists(self.__project.patch):
self.apply_patch()
else:
logger.warning(f"Skipping non-existent patch {self.__project.patch}")

self.__metadata.fetched(
actually_fetched,
Expand Down

0 comments on commit e4053de

Please sign in to comment.