summaryrefslogtreecommitdiff
path: root/cherrypy/test/logtest.py
diff options
context:
space:
mode:
authorSviatoslav Sydorenko <wk@sydorenko.org.ua>2018-09-06 00:55:06 +0200
committerSviatoslav Sydorenko <wk@sydorenko.org.ua>2018-09-06 00:55:06 +0200
commit4df9b4a42971b0daadfee627f625b71b7c14425f (patch)
tree20fffc6581a0b481a0f0351247bae2dff792334f /cherrypy/test/logtest.py
parentb2b2bbad4e693e71b051bfc6f93396ff474adb91 (diff)
downloadcherrypy-git-4df9b4a42971b0daadfee627f625b71b7c14425f.tar.gz
Fix log marker in test logging
Diffstat (limited to 'cherrypy/test/logtest.py')
-rw-r--r--cherrypy/test/logtest.py6
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.