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