mirror of
https://github.com/ansible/awx.git
synced 2026-01-09 23:12:08 -03:30
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.
This commit is contained in:
parent
892410477a
commit
adf930ee42
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user