From 78f70706f71e2ae409cff5ad534faa8d52ea23aa Mon Sep 17 00:00:00 2001 From: Aaron Bach Date: Fri, 28 Jun 2024 08:55:39 -0700 Subject: [PATCH] fix hooks --- ecowitt2mqtt/__main__.py | 2 +- ecowitt2mqtt/core.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ecowitt2mqtt/__main__.py b/ecowitt2mqtt/__main__.py index f66d0b22..2e9ebbfa 100644 --- a/ecowitt2mqtt/__main__.py +++ b/ecowitt2mqtt/__main__.py @@ -251,7 +251,7 @@ def get_cli_arguments(args: list[str]) -> dict[str, Any]: parser.add_argument( "--locale", dest=CONF_LOCALE, - help=f"The locale to set (default: system default)", + help="The locale to set (default: system default)", metavar=CONF_LOCALE, ) parser.add_argument( diff --git a/ecowitt2mqtt/core.py b/ecowitt2mqtt/core.py index 97121545..d58cc1fb 100644 --- a/ecowitt2mqtt/core.py +++ b/ecowitt2mqtt/core.py @@ -63,9 +63,9 @@ def __init__(self, params: dict[str, Any]) -> None: LOGGER.debug("Input CLI options/environment variables: %s", params) LOGGER.debug("Configs loaded: %s", self.configs) - if locale := self.configs.default_config.locale: + if provided_locale := self.configs.default_config.locale: LOGGER.debug("Setting locale: %s", self.configs.default_config.locale) - locale.setlocale(locale.LC_ALL, locale) + locale.setlocale(locale.LC_ALL, provided_locale) self.runtime = Runtime(self)