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:
parent
225e84f115
commit
7e7abafb3e
1 changed files with 4 additions and 1 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue