From 9cd469f616ae9328dabc3c28dd1f0907b72ce8ec Mon Sep 17 00:00:00 2001 From: Antoine Stevan Date: Fri, 20 Aug 2021 11:05:17 +0200 Subject: [PATCH] Code should write everything in root directory. --- src/score.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/score.py b/src/score.py index 8eb8d1d..99e9bbb 100644 --- a/src/score.py +++ b/src/score.py @@ -12,7 +12,7 @@ def main(): # read the stashed scores. print("reading scores", end="... ") - with open(".scores.csv", 'r') as file: + with open(os.path.join(_root, ".scores.csv"), 'r') as file: lines = file.readlines() # score have following format: ';;'. data = list(map(lambda s: tuple(s.strip().split(';')), lines)) @@ -24,7 +24,7 @@ def main(): # read the token to connect the bot. print("reading token", end="... ") - with open(".token.txt", 'r') as token_file: + with open(os.path.join(_root, ".token.txt"), 'r') as token_file: token = token_file.readline() # run the bot.