mirror of
https://github.com/borgbackup/borg.git
synced 2024-12-27 18:28:42 +00:00
ObjectNotFound: give ID as hex-string
This commit is contained in:
parent
d0ec7e76bb
commit
0ae48dafbb
1 changed files with 5 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue