From 766a577cdc45ce4cfe0c4104d6035ad207fccd1a Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Mar 04 2022 15:51:47 +0000 Subject: Initialize locale in CLI We don't actually care about the locale (yet), but not setting this hides bugs when running the CLI tool where, if the locale is initialized, generated text is localized (which it shouldn't be). Signed-off-by: Nils Philippsen --- diff --git a/rpmautospec/cli.py b/rpmautospec/cli.py index 534071a..43142d0 100644 --- a/rpmautospec/cli.py +++ b/rpmautospec/cli.py @@ -1,4 +1,5 @@ import argparse +import locale import logging import sys import typing @@ -91,6 +92,8 @@ def get_cli_args(args: typing.List[str]) -> argparse.Namespace: def main(): + locale.setlocale(locale.LC_ALL, "") + args = get_cli_args(sys.argv[1:]) setup_logging(log_level=args.log_level)