]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: set locale to C.UTF-8 in tox.ini
authorKefu Chai <tchaikov@gmail.com>
Thu, 8 Dec 2022 06:42:42 +0000 (14:42 +0800)
committerKefu Chai <tchaikov@gmail.com>
Thu, 8 Dec 2022 14:39:57 +0000 (22:39 +0800)
as ansible is using UTF-8 encoded characters in the file names, so,
to avoid failures like:

  File "/home/jenkins-build/build/workspace/ceph-pull-requests/qa/.tox/py3/lib/python3.10/site-packages/pip/_internal/utils/unpacking.py", line 217, in untar_file
    with open(path, "wb") as destfp:
UnicodeEncodeError: 'latin-1' codec can't encode characters in position 137-140: ordinal not in range(256)

we have to set a locale which is able to handle UTF-8.

see also https://github.com/ceph/teuthology/pull/1671

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
qa/tox.ini

index 82c1d704c0349fbdd69fd2e7a728799dddff30ed..620cdbb54a0ac23ec0cf8d9f6187c19c9033e09f 100644 (file)
@@ -2,6 +2,11 @@
 envlist = flake8, mypy, pytest, deadsymlinks
 skipsdist = True
 
+[testenv]
+setenv =
+  LC_ALL = C.UTF-8
+  LANG = C
+
 [testenv:flake8]
 basepython = python3
 deps=