From d9481992bb6dbbf8ca8d87e1571c5305aa109c28 Mon Sep 17 00:00:00 2001 From: David Lechner Date: Sat, 25 Apr 2026 17:01:25 -0500 Subject: [PATCH] fix crash in `bumble.att.Attribute.__repr__` If an attribute does not contains a bytes value, it would crash with something like: AttributeError: 'NoneType' object has no attribute 'hex' Clearly, the intention here was to use `value_str` to avoid this possibility. --- bumble/att.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumble/att.py b/bumble/att.py index 688321b..704ce40 100644 --- a/bumble/att.py +++ b/bumble/att.py @@ -1083,7 +1083,7 @@ class Attribute(utils.EventEmitter, Generic[_T]): else: value_str = str(self.value) if value_str: - value_string = f', value={self.value.hex()}' + value_string = f', value={value_str}' else: value_string = '' return (