From 5bfabb48db20173f9506f9e55034cfebe658c9bf Mon Sep 17 00:00:00 2001 From: Greg Gauthier Date: Tue, 12 Mar 2019 13:14:12 +0000 Subject: [PATCH] refactor --- Pipfile | 1 + pwdfile.py | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Pipfile b/Pipfile index e10f309..c0b66f4 100644 --- a/Pipfile +++ b/Pipfile @@ -5,6 +5,7 @@ verify_ssl = true [dev-packages] pycrypto = "*" +fernet = "*" [packages] pycrypto = "*" diff --git a/pwdfile.py b/pwdfile.py index 59e1333..6293af3 100644 --- a/pwdfile.py +++ b/pwdfile.py @@ -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))