From 8b9ac591677eb0f7f60f82fa3c0210ee2d71a270 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 12 Oct 2023 03:23:34 +0200 Subject: [PATCH] `parse_numpy` should also catch `AttributeError`. --- platypush/message/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/platypush/message/__init__.py b/platypush/message/__init__.py index c7ee3e209..03abb3768 100644 --- a/platypush/message/__init__.py +++ b/platypush/message/__init__.py @@ -46,8 +46,8 @@ class Message: if isinstance(obj, (bytes, bytearray)): return '0x' + ''.join([f'{x:02x}' for x in obj]) if callable(obj): - return ''.format(obj.__module__, obj.__name__) - except (ImportError, TypeError): + return f'' + except (AttributeError, ImportError, TypeError): pass return