Skip to content

Commit

Permalink
backup: fix handling early backup cancel
Browse files Browse the repository at this point in the history
If backup is cancelled early, 'scrypt' may not be started yet
(launch_scrypt function can be cancelled). Do not crash in that case.
  • Loading branch information
marmarek committed Apr 15, 2024
1 parent b8e08c8 commit ec10371
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion qubes/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,8 @@ async def _split_and_send(self, input_stream, file_basename,
self.log.debug(
"handle_streams returned: {}".format(run_error))
except:
scrypt.terminate()
if scrypt is not None:
scrypt.terminate()
raise

scrypt.stdin.close()
Expand Down

0 comments on commit ec10371

Please sign in to comment.