Skip to content

Commit

Permalink
Kill storage hook on error
Browse files Browse the repository at this point in the history
  • Loading branch information
Unrud committed Aug 31, 2020
1 parent 0f74257 commit 3a4a7eb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion radicale/storage/multifilesystem/lock.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,11 @@ def acquire_lock(self, mode, user=None):
stdout=subprocess.PIPE if debug else subprocess.DEVNULL,
stderr=subprocess.PIPE if debug else subprocess.DEVNULL,
shell=True, universal_newlines=True, cwd=folder)
stdout_data, stderr_data = p.communicate()
try:
stdout_data, stderr_data = p.communicate()
except BaseException: # e.g. KeyboardInterrupt or SystemExit
p.kill()
raise
if stdout_data:
logger.debug("Captured stdout hook:\n%s", stdout_data)
if stderr_data:
Expand Down

0 comments on commit 3a4a7eb

Please sign in to comment.