diff options
author | Beni ~HB9HNT <11706262+hb9hnt@users.noreply.github.com> | 2024-05-22 21:27:31 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-22 21:27:31 +0200 |
commit | adf930ee426b122b4858ccc5bb567366123b5a05 (patch) | |
tree | 0765a0f7691a2dfd394580be9a3dc594161307b5 /awxkit | |
parent | Fix promote from release event (#15215) (diff) | |
download | awx-adf930ee426b122b4858ccc5bb567366123b5a05.tar.xz awx-adf930ee426b122b4858ccc5bb567366123b5a05.zip |
awxkit: replace deprecated locale.format() with locale.format_string() to fix human output on Python 3.12 (#15170)
Replace deprecated locale.format with locale.format_string
This will be removed in Python 3.12 and will break human output unless fixed.
Diffstat (limited to 'awxkit')
-rw-r--r-- | awxkit/awxkit/cli/format.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/awxkit/awxkit/cli/format.py b/awxkit/awxkit/cli/format.py index e7629a4b69..de2de47262 100644 --- a/awxkit/awxkit/cli/format.py +++ b/awxkit/awxkit/cli/format.py @@ -185,7 +185,7 @@ def format_human(output, fmt): def format_num(v): try: - return locale.format("%.*f", (0, int(v)), True) + return locale.format_string("%.*f", (0, int(v)), True) except (ValueError, TypeError): if isinstance(v, (list, dict)): return json.dumps(v) |