This commit is contained in:
Greg Gauthier 2019-03-12 13:14:12 +00:00
parent 7650571ad0
commit 5bfabb48db
2 changed files with 6 additions and 5 deletions

View File

@ -5,6 +5,7 @@ verify_ssl = true
[dev-packages]
pycrypto = "*"
fernet = "*"
[packages]
pycrypto = "*"

View File

@ -4,13 +4,13 @@ import json
class Pwdfile:
def __init__(self):
self.keysfile = Config().get_pwdfilename()
self.pwdsfile = Config().get_pwdfilename()
def read(self):
with open(self.keysfile, mode="r") as keydata:
return json.load(keydata)
with open(self.pwdsfile, mode="r") as pwddata:
return json.load(pwddata)
def write(self, keys):
with open(self.keysfile, mode="w") as keydata:
keydata.write(json.dumps(keys))
with open(self.pwdsfile, mode="w") as pwddata:
pwddata.write(json.dumps(keys))