Patchwork [3,of,3] badserverext: explicitly flush each log write

login
register
mail settings
Submitter Matt Harbison
Date April 17, 2017, 1:36 a.m.
Message ID <9e4a070227418196062b.1492392960@Envy>
Download mbox | patch
Permalink /patch/20245/
State Accepted
Headers show

Comments

Matt Harbison - April 17, 2017, 1:36 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1492392316 14400
#      Sun Apr 16 21:25:16 2017 -0400
# Node ID 9e4a070227418196062ba84d57cc67411f57c442
# Parent  86304ad8bca815fb293c88f5baaab089bac1cc31
badserverext: explicitly flush each log write

No idea why, but without this, there was no content in the error logs that are
`cat`d in the test on Windows.

Patch

diff --git a/tests/badserverext.py b/tests/badserverext.py
--- a/tests/badserverext.py
+++ b/tests/badserverext.py
@@ -111,6 +111,7 @@ 
 
         object.__getattribute__(self, '_logfp').write(msg)
         object.__getattribute__(self, '_logfp').write('\n')
+        object.__getattribute__(self, '_logfp').flush()
 
     def read(self, size=-1):
         remaining = object.__getattribute__(self, '_closeafterrecvbytes')