diff --git a/CHANGELOG.md b/CHANGELOG.md index 30f1fedc..fbe0b622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,8 +17,10 @@ and this project adheres to [Semantic Versioning][semver]. ### Fixed +- Update handler fix: return an empty list of targets if the targets folder does not exist ([208]) - pytest works when taf installed via wheel ([200]) +[208]: https://github.com/openlawlibrary/taf/pull/208 [207]: https://github.com/openlawlibrary/taf/pull/207 [200]: https://github.com/openlawlibrary/taf/pull/200 diff --git a/taf/updater/handlers.py b/taf/updater/handlers.py index 6adef794..707df086 100644 --- a/taf/updater/handlers.py +++ b/taf/updater/handlers.py @@ -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