(self, exc_type, exc_val, exc_tb)
| 360 | return self |
| 361 | |
| 362 | def __exit__(self, exc_type, exc_val, exc_tb): |
| 363 | try: |
| 364 | if exc_type is not None: |
| 365 | self.shutdown_time = time.monotonic() + 30 |
| 366 | self.rollback() |
| 367 | finally: |
| 368 | # in any case, we want to close the repo cleanly, even if the |
| 369 | # rollback can not succeed (e.g. because the connection was |
| 370 | # already closed) and raised another exception: |
| 371 | logger.debug( |
| 372 | "LegacyRemoteRepository: %s bytes sent, %s bytes received, %d messages sent", |
| 373 | format_file_size(self.tx_bytes), |
| 374 | format_file_size(self.rx_bytes), |
| 375 | self.msgid, |
| 376 | ) |
| 377 | self.close() |
| 378 | |
| 379 | @property |
| 380 | def id_str(self): |
nothing calls this directly
no test coverage detected