From 90861503a3702d3bef4b5de63d90f221d3ff9d12 Mon Sep 17 00:00:00 2001 From: Nodude <75137537+NodudeWasTaken@users.noreply.github.com> Date: Mon, 1 Jul 2024 15:43:14 +0200 Subject: [PATCH] JSON save fix --- dancer/ui.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dancer/ui.py b/dancer/ui.py index 3638b29..97b7841 100755 --- a/dancer/ui.py +++ b/dancer/ui.py @@ -25,11 +25,11 @@ def __init__(self) -> None: self.configfile = "config.json" self.data = {} if os.path.exists(self.configfile): - with open(self.configfile, "rb") as f: + with open(self.configfile, "r") as f: self.data = json.load(f) def save(self, name, val): self.data[name] = val - with open(self.configfile, "wb") as f: + with open(self.configfile, "w") as f: json.dump(self.data, f) def get(self, name, default): if name in self.data: