[gtk-doc] common: flush stdout before replacing
- From: Stefan Sauer <stefkost src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-doc] common: flush stdout before replacing
- Date: Mon, 4 Dec 2017 16:09:15 +0000 (UTC)
commit ad0539343cdc4da19e40184701250cc0b12d557e
Author: Stefan Sauer <ensonic users sf net>
Date: Mon Dec 4 17:08:16 2017 +0100
common: flush stdout before replacing
There should be nothing buffered yet, but lets play safe.
gtkdoc/common.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/gtkdoc/common.py b/gtkdoc/common.py
index 126aada..5871465 100644
--- a/gtkdoc/common.py
+++ b/gtkdoc/common.py
@@ -74,6 +74,7 @@ def setup_logging():
# we get UnicodeEncodeError:
encoding = sys.stdout.encoding
if 'PYTHONIOENCODING' not in os.environ and (not encoding or encoding != 'UTF-8'):
+ sys.stdout.flush()
if six.PY3:
sys.stdout = open(sys.stdout.fileno(), mode='w', encoding='utf8', buffering=1)
else:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]