From 6282e68524dcb0fe9eab94b1f33e65ecd4e9da5e Mon Sep 17 00:00:00 2001 From: Kotesh Kumar Yelamati Date: Wed, 15 Jul 2026 00:10:23 -0400 Subject: [PATCH] Fix bare except clause in msgpack/fallback.py Catch specific exceptions during packing to improve error handling. --- msgpack/fallback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/msgpack/fallback.py b/msgpack/fallback.py index 824f59d5..c2186d65 100644 --- a/msgpack/fallback.py +++ b/msgpack/fallback.py @@ -806,7 +806,7 @@ def _pack( def pack(self, obj): try: self._pack(obj) - except: + except Exception: self._buffer = BytesIO() # force reset raise if self._autoreset: