forked from platypush/platypush
Expose Config.workdir
property.
This is a useful proxy to avoid using `Config.get('workdir')` string lookup.
This commit is contained in:
parent
c846c61493
commit
d49e5b1f6a
1 changed files with 10 additions and 0 deletions
|
@ -460,6 +460,16 @@ class Config:
|
|||
"""
|
||||
return cls._get_instance(cfgfile, force_reload=True)
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def workdir(cls) -> str:
|
||||
"""
|
||||
:return: The path of the configured working directory.
|
||||
"""
|
||||
workdir = cls._get_instance().get('workdir')
|
||||
assert workdir
|
||||
return workdir # type: ignore
|
||||
|
||||
@classmethod
|
||||
def get(cls, key: Optional[str] = None):
|
||||
"""
|
||||
|
|
Loading…
Reference in a new issue