MCPcopy
hub / github.com/borgbackup/borg / __exit__

Method __exit__

src/borg/remote.py:663–675  ·  view source on GitHub ↗
(self, exc_type, exc_val, exc_tb)

Source from the content-addressed store, hash-verified

661 return self
662
663 def __exit__(self, exc_type, exc_val, exc_tb):
664 try:
665 if exc_type is not None:
666 self.shutdown_time = time.monotonic() + 30
667 finally:
668 # in any case, we want to close the repo cleanly.
669 logger.debug(
670 "RemoteRepository: %s bytes sent, %s bytes received, %d messages sent",
671 format_file_size(self.tx_bytes),
672 format_file_size(self.rx_bytes),
673 self.msgid,
674 )
675 self.close()
676
677 @property
678 def id_str(self):

Callers 1

closeMethod · 0.45

Calls 3

closeMethod · 0.95
format_file_sizeFunction · 0.85
debugMethod · 0.80

Tested by

no test coverage detected