From 370c3720512a5f377a79b62ad05a65de9f878e06 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 3 Oct 2020 11:11:26 +0100 Subject: [PATCH] Remove column images if they don't exist for a theme --- theme.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/theme.py b/theme.py index d96777f4..8e361009 100644 --- a/theme.py +++ b/theme.py @@ -972,6 +972,11 @@ def setThemeImages(baseDir: str, name: str) -> None: if os.path.isfile(leftColImageFilename): copyfile(leftColImageFilename, accountDir + '/left_col_image.png') + else: + if os.path.isfile(accountDir + + '/left_col_image.png'): + os.remove(accountDir + '/left_col_image.png') + except BaseException: pass @@ -979,6 +984,10 @@ def setThemeImages(baseDir: str, name: str) -> None: if os.path.isfile(rightColImageFilename): copyfile(rightColImageFilename, accountDir + '/right_col_image.png') + else: + if os.path.isfile(accountDir + + '/right_col_image.png'): + os.remove(accountDir + '/right_col_image.png') except BaseException: pass