forked from platypush/platypush
Replaced Config.workdir
with Config.get_workdir()
.
Again, Python < 3.9 doesn't like class properties.
This commit is contained in:
parent
a8836f95f5
commit
1825b492b3
3 changed files with 3 additions and 4 deletions
|
@ -498,8 +498,7 @@ class Config:
|
|||
return cfg
|
||||
|
||||
@classmethod
|
||||
@property
|
||||
def workdir(cls) -> str:
|
||||
def get_workdir(cls) -> str:
|
||||
"""
|
||||
:return: The path of the configured working directory.
|
||||
"""
|
||||
|
|
|
@ -117,7 +117,7 @@ class XmppPlugin(AsyncRunnablePlugin, XmppBasePlugin):
|
|||
auto_accept_invites=auto_accept_invites,
|
||||
restore_state=restore_state,
|
||||
state_file=os.path.expanduser(
|
||||
state_file or os.path.join(Config.workdir, 'xmpp', 'state.json')
|
||||
state_file or os.path.join(Config.get_workdir(), 'xmpp', 'state.json')
|
||||
),
|
||||
)
|
||||
self._loaded_state = SerializedState()
|
||||
|
|
|
@ -523,7 +523,7 @@ def get_or_generate_jwt_rsa_key_pair():
|
|||
"""
|
||||
from platypush.config import Config
|
||||
|
||||
key_dir = os.path.join(Config.workdir, 'jwt')
|
||||
key_dir = os.path.join(Config.get_workdir(), 'jwt')
|
||||
priv_key_file = os.path.join(key_dir, 'id_rsa')
|
||||
pub_key_file = priv_key_file + '.pub'
|
||||
|
||||
|
|
Loading…
Reference in a new issue