aboutsummaryrefslogtreecommitdiff
path: root/geldschieberbot.py
diff options
context:
space:
mode:
Diffstat (limited to 'geldschieberbot.py')
-rw-r--r--geldschieberbot.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/geldschieberbot.py b/geldschieberbot.py
index 93766fe..fb002fa 100644
--- a/geldschieberbot.py
+++ b/geldschieberbot.py
@@ -11,7 +11,8 @@ import tanken
state_file = os.environ["GSB_STATE_FILE"]
if os.path.isfile(state_file):
- state = json.load(open(state_file, "r"))
+ with open(state_file, "r") as state_f:
+ state = json.load(state_f)
else:
# Dict containing the whole state of geldschieberbot
# balance - dict of dicts associating two persons to an amount