From 9b16c639d117e515467ff0c609d88c63f0cac192 Mon Sep 17 00:00:00 2001 From: Zak Nelson Date: Mon, 16 Dec 2019 09:29:44 +0000 Subject: [PATCH] Fix issue with whitespace in config --- FoobarMiniplayer.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/FoobarMiniplayer.py b/FoobarMiniplayer.py index d06ea6c..7755007 100755 --- a/FoobarMiniplayer.py +++ b/FoobarMiniplayer.py @@ -324,15 +324,15 @@ def load_config(): if "position" in line: x_loc = line.find("=")+1 y_loc = line.find(",")+1 - x = int(line[x_loc:y_loc-1]) - y = int(line[y_loc:]) + x = int(line[x_loc:y_loc-1].strip()) + y = int(line[y_loc:].strip()) position = (x, y) if "alpha" in line: - alpha = float(line[line.find("=")+1:]) + alpha = float(line[line.find("=")+1:].strip()) if "col_fg" in line: - col_fg = line[line.find("#"):] + col_fg = line[line.find("#"):].strip() if "col_bg" in line: - col_bg = line[line.find("#"):] + col_bg = line[line.find("#"):].strip() config.close() return