Skip to content

Commit

Permalink
Return an empty list of targets if the targets folder does not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
renatav committed Feb 10, 2022
1 parent fd99b88 commit b5dbcbc
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions taf/updater/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,12 @@ def ensure_not_changed(self, metadata_filename):
)

def get_current_targets(self):
return self.validation_auth_repo.list_files_at_revision(
self.current_commit, "targets"
)
try:
return self.validation_auth_repo.list_files_at_revision(
self.current_commit, "targets"
)
except GitError:
return []

def get_mirrors(self, _file_type, _file_path):
# pylint: disable=unused-argument
Expand Down

0 comments on commit b5dbcbc

Please sign in to comment.