MCPcopy Index your code
hub / github.com/borgbackup/borg / delete

Method delete

src/borg/repository.py:502–513  ·  view source on GitHub ↗

delete a repo object Note: when doing calls with wait=False this gets async and caller must deal with async results / exceptions later.

(self, id, wait=True)

Source from the content-addressed store, hash-verified

500 self.store.store(key, data)
501
502 def delete(self, id, wait=True):
503 """delete a repo object
504
505 Note: when doing calls with wait=False this gets async and caller must
506 deal with async results / exceptions later.
507 """
508 self._lock_refresh()
509 key = "data/" + bin_to_hex(id)
510 try:
511 self.store.delete(key)
512 except StoreObjectNotFound:
513 raise self.ObjectNotFound(id, str(self._location)) from None
514
515 def async_response(self, wait=True):
516 """Get one async result (only applies to remote repositories).

Callers 2

checkMethod · 0.45
store_deleteMethod · 0.45

Calls 2

_lock_refreshMethod · 0.95
bin_to_hexFunction · 0.85

Tested by

no test coverage detected