2019-03-18 15:28:32 +00:00
|
|
|
from cfgfile import CfgFile
|
2019-03-11 16:29:14 +00:00
|
|
|
|
|
|
|
|
2019-03-12 12:27:34 +00:00
|
|
|
class Config:
|
2019-03-11 16:29:14 +00:00
|
|
|
def __init__(self):
|
2019-03-18 15:28:32 +00:00
|
|
|
self.cfgfile = CfgFile()
|
|
|
|
self.data = self.cfgfile.read()
|
2019-03-11 16:29:14 +00:00
|
|
|
|
2019-03-12 12:27:34 +00:00
|
|
|
def get_pwdfilename(self):
|
2019-03-12 15:32:12 +00:00
|
|
|
return self.data["pwdfilename"]
|
2019-03-12 12:27:34 +00:00
|
|
|
|
2019-03-12 14:57:58 +00:00
|
|
|
def set_pwdfilename(self, pwdfilename):
|
|
|
|
self.data["pwdfilename"] = pwdfilename
|
2019-03-18 15:28:32 +00:00
|
|
|
self.cfgfile.write(self.data)
|
2019-03-12 12:27:34 +00:00
|
|
|
|
|
|
|
def get_secret(self):
|
|
|
|
return self.data["secret"]
|
|
|
|
|
|
|
|
def set_secret(self, secret):
|
2019-03-12 14:57:58 +00:00
|
|
|
self.data["secret"] = secret
|
2019-03-18 15:28:32 +00:00
|
|
|
self.cfgfile.write(self.data)
|