From 11bb2c8a07ea67b13f758e890ff14811f35109c9 Mon Sep 17 00:00:00 2001 From: Nicolas Dumazet <nicolas.dumazet@nexedi.com> Date: Tue, 13 Oct 2009 16:30:26 +0000 Subject: [PATCH] doc-only: explain why we use a while construct here git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@29611 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5/Tool/TemplateTool.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/product/ERP5/Tool/TemplateTool.py b/product/ERP5/Tool/TemplateTool.py index 64fa20c2e5..ac47bf06a6 100644 --- a/product/ERP5/Tool/TemplateTool.py +++ b/product/ERP5/Tool/TemplateTool.py @@ -459,6 +459,10 @@ class TemplateTool (BaseTool): stdout=subprocess.PIPE, stderr=subprocess.STDOUT) + # "for line in process.stdout" is cleaner but is buffered, + # see http://bugs.python.org/issue3907 + # We use this ugly construct to avoid waiting for test + # termination before printing content while True: line = process.stdout.readline() if not line: -- 2.30.9