From 88493c60e898d1f53604b812c9c3822ccd0908f4 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 19 Apr 2022 11:18:56 +0200 Subject: geldschieberbot: use explicit open encoding --- geldschieberbot.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/geldschieberbot.py b/geldschieberbot.py index edfb148..41d3b3c 100644 --- a/geldschieberbot.py +++ b/geldschieberbot.py @@ -11,7 +11,7 @@ import tanken state_file = os.environ["GSB_STATE_FILE"] if os.path.isfile(state_file): - with open(state_file, "r") as state_f: + with open(state_file, 'r', encoding='utf-8') as state_f: state = json.load(state_f) else: # Dict containing the whole state of geldschieberbot @@ -976,7 +976,7 @@ def main(): else: break - with open(state_file, "w") as f: + with open(state_file, 'w', encoding='utf-8') as f: json.dump(state, f) -- cgit v1.2.3