refactor
This commit is contained in:
parent
7650571ad0
commit
5bfabb48db
1
Pipfile
1
Pipfile
@ -5,6 +5,7 @@ verify_ssl = true
|
|||||||
|
|
||||||
[dev-packages]
|
[dev-packages]
|
||||||
pycrypto = "*"
|
pycrypto = "*"
|
||||||
|
fernet = "*"
|
||||||
|
|
||||||
[packages]
|
[packages]
|
||||||
pycrypto = "*"
|
pycrypto = "*"
|
||||||
|
10
pwdfile.py
10
pwdfile.py
@ -4,13 +4,13 @@ import json
|
|||||||
|
|
||||||
class Pwdfile:
|
class Pwdfile:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.keysfile = Config().get_pwdfilename()
|
self.pwdsfile = Config().get_pwdfilename()
|
||||||
|
|
||||||
def read(self):
|
def read(self):
|
||||||
with open(self.keysfile, mode="r") as keydata:
|
with open(self.pwdsfile, mode="r") as pwddata:
|
||||||
return json.load(keydata)
|
return json.load(pwddata)
|
||||||
|
|
||||||
def write(self, keys):
|
def write(self, keys):
|
||||||
with open(self.keysfile, mode="w") as keydata:
|
with open(self.pwdsfile, mode="w") as pwddata:
|
||||||
keydata.write(json.dumps(keys))
|
pwddata.write(json.dumps(keys))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user