1
0
Fork 0
mirror of https://github.com/borgbase/vorta synced 2025-02-01 12:21:28 +00:00

Catch ProcessLookupError in BorgJob.cancel. (#1520)

Co-authored-by: real-yfprojects <real-yfprojects@users.noreply.github.com>
This commit is contained in:
yfprojects 2022-12-25 16:52:24 +00:00 committed by GitHub
parent 225e84f115
commit 7e7abafb3e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -117,7 +117,10 @@ def cancel(self):
try:
self.process.wait(timeout=3)
except TimeoutExpired:
os.killpg(os.getpgid(self.process.pid), signal.SIGTERM)
try:
os.killpg(os.getpgid(self.process.pid), signal.SIGTERM)
except ProcessLookupError:
pass
@classmethod
def prepare(cls, profile):