From 4d69756b2f67eac1a65047e8a6b6b03faed95cfa Mon Sep 17 00:00:00 2001 From: Phxntxm Date: Sun, 17 Jul 2016 11:33:28 -0500 Subject: [PATCH] Changed writing method to file --- cogs/utils/config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cogs/utils/config.py b/cogs/utils/config.py index fd1d026..dd6d74d 100644 --- a/cogs/utils/config.py +++ b/cogs/utils/config.py @@ -42,7 +42,7 @@ def closeConnection(): connection.close() def saveContent(key: str, content): - with open("/home/phxntx5/public_html/Bonfire/config.json", "r+") as jf: + with open("/home/phxntx5/public_html/Bonfire/config.json", "rw") as jf: data = json.load(jf) data[key] = content jf.seek(0) @@ -51,7 +51,7 @@ def saveContent(key: str, content): def getContent(key: str): try: - with open("/home/phxntx5/public_html/Bonfire/config.json", "r+") as jf: + with open("/home/phxntx5/public_html/Bonfire/config.json", "rw") as jf: data = json.load(jf) jf.close() return data[key]