mirror of https://github.com/borgbase/vorta
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
|
@ -117,7 +117,10 @@ class BorgJob(JobInterface, BackupProfileMixin):
|
|||
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 New Issue