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

Method close

src/borg/legacyremote.py:696–711  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

694 """actual remoting is done via self.call in the @api decorator"""
695
696 def close(self):
697 if self.p or self.sock:
698 self.call("close", {}, wait=True)
699 if self.p:
700 self.p.stdin.close()
701 self.p.stdout.close()
702 self.p.wait()
703 self.p = None
704 if self.sock:
705 try:
706 self.sock.shutdown(socket.SHUT_RDWR)
707 except OSError as e:
708 if e.errno != errno.ENOTCONN:
709 raise
710 self.sock.close()
711 self.sock = None
712
713 def async_response(self, wait=True):
714 for resp in self.call_many("async_responses", calls=[], wait=True, async_wait=wait):

Callers 3

__init__Method · 0.95
__del__Method · 0.95
__exit__Method · 0.95

Calls 2

callMethod · 0.95
closeMethod · 0.45

Tested by

no test coverage detected