Merge pull request #12 from chu23465/main

Update device.py for better naming
This commit is contained in:
larley 2024-11-26 14:57:01 +01:00 committed by GitHub
commit 27c666915d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -102,4 +102,4 @@ class Device:
def get_name(self):
name = f"{self.group_certificate.get_name()}_sl{self.group_certificate.get_security_level()}"
return ''.join(char for char in name if (char.isalpha() or char in ['_', '-', ' '])).strip().lower().replace(" ", "_")
return ''.join(char for char in name if (char.isalnum() or char in '_- ')).strip().lower().replace(" ", "_")