diff --git a/src/borg/repository.py b/src/borg/repository.py index 00a9c4e10..c83edcec8 100644 --- a/src/borg/repository.py +++ b/src/borg/repository.py @@ -96,6 +96,11 @@ class CheckNeeded(ErrorWithTraceback): class ObjectNotFound(ErrorWithTraceback): """Object with key {} not found in repository {}.""" + def __init__(self, id, repo): + if isinstance(id, bytes): + id = bin_to_hex(id) + super().__init__(id, repo) + def __init__(self, path, create=False, exclusive=False, lock_wait=None, lock=True, append_only=False): self.path = os.path.abspath(path) self._location = Location('file://%s' % self.path)