Skip to content
Snippets Groups Projects
Commit f0c75239 authored by jkerdreu's avatar jkerdreu
Browse files

Added reduced_addr as default display_name



git-svn-id: https://redmine.imt-atlantique.fr/svn/xaal/code/Python/branches/0.7@2882 b32b6428-25c9-4566-ad07-03861ab6144f
parent 08f5b5a8
Branches
No related tags found
No related merge requests found
......@@ -122,6 +122,7 @@ def pass2key(passphrase):
key = pysodium.crypto_pwhash_scryptsalsa208sha256(KEY_BYTES, buf, salt, opslimit, memlimit)
return key
@functools.lru_cache(maxsize=128)
def reduce_addr(addr):
"""return a string based addred without all digits"""
tmp = addr.str
......
......@@ -94,7 +94,7 @@ class Device:
@property
def display_name(self):
result = ''
result = tools.reduce_addr(self.address)
result = self.db.get('nickname',result)
result = self.db.get('name',result)
return result
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment