Skip to content

Commit

Permalink
repo: Improve test client error messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jku committed Mar 30, 2024
1 parent 925c792 commit abbe12a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions repo/tuf_on_ci/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ def client(
# HACK: replace reference time with ours: initial root has been loaded
# already but that is fine: the expiry check only happens during refresh
updater._trusted_set.reference_time = datetime.fromtimestamp(time)
ref_time_string = f" (reference time {updater._trusted_set.reference_time})"
ref_time_string = f" at reference time {updater._trusted_set.reference_time}"

# Confirm we can get valid top level metadata from remote
try:
updater.refresh()
except ExpiredMetadataError as e:
sys.exit(f"Update{ref_time_string} failed: {e}")
sys.exit(f"Error: Update failed: {e}{ref_time_string}")
print(f"Client metadata update from {metadata_url}{ref_time_string}: OK")

if compare_source:
Expand Down

0 comments on commit abbe12a

Please sign in to comment.