forked from platypush/platypush
Added Config.get_device_id()
classmethod.
This commit is contained in:
parent
eec2908cc2
commit
6108cbb621
1 changed files with 9 additions and 0 deletions
|
@ -581,6 +581,15 @@ class Config:
|
||||||
assert workdir
|
assert workdir
|
||||||
return workdir # type: ignore
|
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
|
@classmethod
|
||||||
def get_cachedir(cls) -> str:
|
def get_cachedir(cls) -> str:
|
||||||
"""
|
"""
|
||||||
|
|
Loading…
Reference in a new issue