address: add public information to the stringified value

This affect the way security keys are stored. For instance the same
key can be used both as public and random, and it need to be stored
separately one from each other.
This commit is contained in:
Abel Lucas
2022-11-14 19:55:40 +00:00
parent 27c46eef9d
commit c0810230a6
2 changed files with 5 additions and 2 deletions

View File

@@ -1753,7 +1753,10 @@ class Address:
'''
String representation of the address, MSB first
'''
return ':'.join([f'{x:02X}' for x in reversed(self.address_bytes)])
str = ':'.join([f'{x:02X}' for x in reversed(self.address_bytes)])
if not self.is_public:
return str
return str + '/P'
# -----------------------------------------------------------------------------