From 8710a919afecec802383c8b867ac9c20a6de10ad Mon Sep 17 00:00:00 2001 From: Viljami Ilola <+@hix.fi> Date: Tue, 9 Apr 2024 00:43:55 +0300 Subject: fix hisghscore file reading --- src/sliceitoff/hiscores/hiscores.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/sliceitoff/hiscores/hiscores.py b/src/sliceitoff/hiscores/hiscores.py index 5ce8ced..4b71c1a 100644 --- a/src/sliceitoff/hiscores/hiscores.py +++ b/src/sliceitoff/hiscores/hiscores.py @@ -21,9 +21,9 @@ class HiScores: return with open(self.config_filename, "r", encoding="utf-8") as config_file: for line in config_file: - option, value = line.split('=') - if option == 'hiscore': - score, name = value.split('!') + option, *value = line.split('=') + if option == 'hiscore' and value: + score, name = value[0].split('!') self.add(int(score.strip()),name.strip()) if len(self.table)