diff options
author | Sviatoslav Sydorenko <wk@sydorenko.org.ua> | 2018-09-06 00:55:06 +0200 |
---|---|---|
committer | Sviatoslav Sydorenko <wk@sydorenko.org.ua> | 2018-09-06 00:55:06 +0200 |
commit | 4df9b4a42971b0daadfee627f625b71b7c14425f (patch) | |
tree | 20fffc6581a0b481a0f0351247bae2dff792334f /cherrypy/test/logtest.py | |
parent | b2b2bbad4e693e71b051bfc6f93396ff474adb91 (diff) | |
download | cherrypy-git-4df9b4a42971b0daadfee627f625b71b7c14425f.tar.gz |
Fix log marker in test logging
Diffstat (limited to 'cherrypy/test/logtest.py')
-rw-r--r-- | cherrypy/test/logtest.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cherrypy/test/logtest.py b/cherrypy/test/logtest.py index cc3afcfe..c6edc5d0 100644 --- a/cherrypy/test/logtest.py +++ b/cherrypy/test/logtest.py @@ -4,7 +4,7 @@ import sys import time from uuid import UUID -from cherrypy._cpcompat import text_or_bytes, ntob +from cherrypy._cpcompat import text_or_bytes try: @@ -103,7 +103,9 @@ class LogCase(object): self.lastmarker = key open(self.logfile, 'ab+').write( - ntob('%s%s\n' % (self.markerPrefix, key), 'utf-8')) + b'%s%s\n' + % (self.markerPrefix, key.encode('utf-8')) + ) def _read_marked_region(self, marker=None): """Return lines from self.logfile in the marked region. |