From ea47d0f2aa093f926323a802309aeaea651a2dbc Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Wed, 27 Dec 2023 15:23:55 +0100 Subject: [PATCH] fix: locale check & remove special handling --- main.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/main.py b/main.py index 17dda5b..d6661d1 100755 --- a/main.py +++ b/main.py @@ -17,7 +17,7 @@ import locale import fallback_csv import platform -if not platform.system() == "Linux": +if platform.system() != "Linux": locale.setlocale(locale.LC_TIME, "de_DE.UTF-8") CSV_DIR = "csvfiles" @@ -114,8 +114,6 @@ def checkLastMonths(backwardsMonths=6): # parse and dump mname = calendar.month_name[monthNumber] - if monthNumber == 3: - mname = "März" # fix german months csvOut = os.path.join(CSV_DIR, 'Wetterdaten-{}-{}.csv'.format(mname, year)) with open(csvOut, 'w', newline='', encoding="utf-8") as file: