diff --git a/cfg/config.json b/cfg/config.json index 381e6c1..91ba495 100644 --- a/cfg/config.json +++ b/cfg/config.json @@ -1 +1 @@ -{"pwdfilename": "pwdfile.json", "secret": null} \ No newline at end of file +{"pwdfilename": "eg/pwdfile.json", "secret": "5MrW89mydi5SU9X0w7nSFlk-g5ERyKDlN4-N2z6ZR7M="} \ No newline at end of file diff --git a/configuration.py b/configuration.py index 4161304..b8b8686 100644 --- a/configuration.py +++ b/configuration.py @@ -6,7 +6,7 @@ class Config: self.data = self.read() def get_pwdfilename(self): - return self.data["pwdfile"] + return self.data["pwdfilename"] def set_pwdfilename(self, pwdfilename): self.data["pwdfilename"] = pwdfilename diff --git a/credentials.py b/credentials.py index eb37307..3743d05 100644 --- a/credentials.py +++ b/credentials.py @@ -28,7 +28,7 @@ class Credentials: if username is None and password is not None: self.creds[service] = { "username": current_entry["username"], - "password": Password().encrypt(password) + "password": Password().encrypt(password).decode() } elif username is not None and password is None: self.creds[service] = { diff --git a/pwdfile.json b/eg/pwdfile.json similarity index 83% rename from pwdfile.json rename to eg/pwdfile.json index f603776..37ed6a0 100644 --- a/pwdfile.json +++ b/eg/pwdfile.json @@ -1 +1 @@ -{"twitter": {"username": "@twitterhandle", "password": "gobbledygook"}, "youtube": {"username": "googlemail@gmail.com", "password": "moregobbledygook"}} \ No newline at end of file +{"twitter": {"username": "@twitterhandle", "password": "gobbledygook"}, "youtube": {"username": "googlemail@gmail.com", "password": "moregobbledygook"}}