1
0
Fork 0
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:
Marian Beermann 2016-07-28 18:41:19 +02:00
parent d0ec7e76bb
commit 0ae48dafbb
No known key found for this signature in database
GPG key ID: 9B8450B91D1362C1

View file

@ -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)