python: Catch BaseException when we need to clean something up.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2020-10-08 18:00:21 -07:00
committed by Tim Abbott
parent 7f69c1d3d5
commit b7a94be152
3 changed files with 3 additions and 3 deletions

View File

@@ -53,7 +53,7 @@ def overwrite_symlink(src: str, dst: str) -> None:
break
try:
os.rename(tmp, dst)
except Exception:
except BaseException:
os.remove(tmp)
raise