mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
compat: some 2.x pypy versions produce UnicodeEncodeError: 'ascii' codec can't encode character on surrogates (uni_string must be fixed also for UTF-8 system encoding)
This commit is contained in:
parent
9510346507
commit
253d47d33c
1 changed files with 2 additions and 1 deletions
|
|
@ -201,7 +201,8 @@ class TestsUtilsTest(LogCaptureTestCase):
|
|||
uni_decode((b'test\xcf' if sys.version_info >= (3,) else u'test\xcf'))
|
||||
uni_string(b'test\xcf')
|
||||
uni_string('test\xcf')
|
||||
uni_string(u'test\xcf')
|
||||
if sys.version_info < (3,) and 'PyPy' not in sys.version:
|
||||
uni_string(u'test\xcf')
|
||||
|
||||
def testSafeLogging(self):
|
||||
# logging should be exception-safe, to avoid possible errors (concat, str. conversion, representation failures, etc)
|
||||
|
|
|
|||
Loading…
Reference in a new issue