Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
python: Catch BaseException when we need to clean something up.
Anders Kaseorgb7a94be152dc
diff --git a/scripts/lib/zulip_tools.py b/scripts/lib/zulip_tools.pyindex 743cfe0d475..45d5ba2b313 100755--- a/scripts/lib/zulip_tools.py+++ b/scripts/lib/zulip_tools.py@@ -53,7 +53,7 @@ def overwrite_symlink(src: str, dst: str) -> None:breaktry:os.rename(tmp, dst)- except Exception:+ except BaseException:os.remove(tmp)raisediff --git a/zerver/lib/queue.py b/zerver/lib/queue.pyindex 87c454c402d..13890adb466 100644--- a/zerver/lib/queue.py+++ b/zerver/lib/queue.py@@ -167,7 +167,7 @@ class SimpleQueueClient:try:callback(events)channel.basic_ack(max_processed, multiple=True)- except Exception:+ except BaseException:channel.basic_nack(max_processed, multiple=True)raiseevents = []diff --git a/zerver/management/commands/export_usermessage_batch.py b/zerver/management/commands/export_usermessage_batch.pyindex cb5ce69bd99..0e07f2804df 100644--- a/zerver/management/commands/export_usermessage_batch.py+++ b/zerver/management/commands/export_usermessage_batch.py@@ -35,7 +35,7 @@ class Command(BaseCommand):logging.info("Thread %s processing %s", options['thread'], output_path)try:export_usermessages_batch(locked_path, output_path, options["consent_message_id"])- except Exception:+ except BaseException:# Put the item back in the free pool when we failos.rename(locked_path, partial_path)raise