Added Config.get_device_id() classmethod.

This commit is contained in:
Fabio Manganiello 2023-11-18 23:04:19 +01:00
parent eec2908cc2
commit 6108cbb621
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -581,6 +581,15 @@ class Config:
assert workdir
return workdir # type: ignore
@classmethod
def get_device_id(cls) -> str:
"""
:return: The configured/default device ID.
"""
device_id = cls._get_instance().get('device_id')
assert device_id
return device_id # type: ignore
@classmethod
def get_cachedir(cls) -> str:
"""