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

Method close

src/borg/remote.py:1016–1031  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1014 """actual remoting is done via self.call in the @api decorator"""
1015
1016 def close(self):
1017 if self.p or self.sock:
1018 self.call("close", {}, wait=True)
1019 if self.p:
1020 self.p.stdin.close()
1021 self.p.stdout.close()
1022 self.p.wait()
1023 self.p = None
1024 if self.sock:
1025 try:
1026 self.sock.shutdown(socket.SHUT_RDWR)
1027 except OSError as e:
1028 if e.errno != errno.ENOTCONN:
1029 raise
1030 self.sock.close()
1031 self.sock = None
1032
1033 def async_response(self, wait=True):
1034 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