UTF-8 encode Twisted logs (allenap)
This commit is contained in:
parent
73a88b7c56
commit
52b5d19191
|
@ -173,8 +173,8 @@ class CaptureTwistedLogs(Fixture):
|
|||
logs = StringIO()
|
||||
full_observer = log.FileLogObserver(logs)
|
||||
self.useFixture(_TwistedLogObservers([full_observer.emit]))
|
||||
self.addDetail(self.LOG_DETAIL_NAME,
|
||||
Content(UTF8_TEXT, lambda: [logs.getvalue()]))
|
||||
self.addDetail(self.LOG_DETAIL_NAME, Content(
|
||||
UTF8_TEXT, lambda: [logs.getvalue().encode("utf-8")]))
|
||||
|
||||
|
||||
def run_with_log_observers(observers, function, *args, **kwargs):
|
||||
|
|
Loading…
Reference in New Issue