diff options
author | Sergio Martins <smartins@kde.org> | 2019-10-08 12:19:03 +0100 |
---|---|---|
committer | Sergio Martins <smartins@kde.org> | 2019-10-08 23:39:48 +0100 |
commit | 54de206f2a331a4f0719d5c7396f88b2cd691367 (patch) | |
tree | aa21def86c43fccf9ce103209bb9b8ddea4f931f | |
parent | 95359d148d2176df2b9a92106c17779e80ef3cce (diff) |
tests: Fix exceptions about environment having non ascii
-rwxr-xr-x | tests/run_tests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py index 4977dbc0..f6b55f6c 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -94,8 +94,10 @@ class Test: def setEnv(self, e): self.env = os.environ.copy() for key in e: - key_str = key.encode('ascii', 'ignore') - self.env[key_str] = e[key].encode('ascii', 'ignore') + if type(key) is bytes: + key = key.decode('utf-8') + + self.env[key] = e[key] def printableName(self, is_standalone, is_fixits): name = self.check.name |