mirror of
https://github.com/borgbackup/borg.git
synced 2026-03-27 04:44:05 -04:00
Merge pull request #1685 from enkore/f/remote-excs
fix debug get-obj / delete-obj crash if object not found and remote repo
This commit is contained in:
commit
1166ade6ed
1 changed files with 2 additions and 2 deletions
|
|
@ -767,7 +767,7 @@ class Archiver:
|
|||
else:
|
||||
try:
|
||||
data = repository.get(id)
|
||||
except repository.ObjectNotFound:
|
||||
except Repository.ObjectNotFound:
|
||||
print("object %s not found." % hex_id)
|
||||
else:
|
||||
with open(args.path, "wb") as f:
|
||||
|
|
@ -801,7 +801,7 @@ class Archiver:
|
|||
repository.delete(id)
|
||||
modified = True
|
||||
print("object %s deleted." % hex_id)
|
||||
except repository.ObjectNotFound:
|
||||
except Repository.ObjectNotFound:
|
||||
print("object %s not found." % hex_id)
|
||||
if modified:
|
||||
repository.commit()
|
||||
|
|
|
|||
Loading…
Reference in a new issue