Skip to content

Commit

Permalink
debug-put-obj: rather use CommandError for invalid ID
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasWaldmann committed Nov 12, 2023
1 parent 8b57928 commit 8284377
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/borg/archiver.py
Original file line number Diff line number Diff line change
Expand Up @@ -2211,7 +2211,7 @@ def do_debug_put_obj(self, args, repository):
if len(id) != 32: # 256bit
raise ValueError("id must be 256bits or 64 hex digits")
except ValueError as err:
raise RTError("object id %s is invalid [%s]." % (hex_id, str(err)))
raise CommandError("object id %s is invalid [%s]." % (hex_id, str(err)))
repository.put(id, data)
print("object %s put." % hex_id)
repository.commit(compact=False)
Expand Down

0 comments on commit 8284377

Please sign in to comment.