[Piuparts-commits] [SCM] piuparts git repository branch, piatti, updated. 0.44-689-gbf31baf

Andreas Beckmann debian at abeckmann.de
Sun Jun 10 11:10:17 UTC 2012


The following commit has been merged in the piatti branch:
commit f70194a3758c8b6c523988004921cc2c1803b7c7
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Sun Jun 3 19:57:37 2012 +0200

    p: run(): don't ignore_errors after overflow/timeout
    
    Excessive output or timeout are serious conditions where we
    don't want to continue afterwards.
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piuparts.py b/piuparts.py
index 86c6fd1..9133572 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -430,6 +430,7 @@ def run(command, ignore_errors=False, timeout=0):
             output += p.stdout.read(1 << 16)
             if (len(output) > settings.max_command_output_size):
                 excessive_output = True
+                ignore_errors = False
                 alarm(0)
                 kill_subprocess(p, "excessive output")
                 output += "\n\n***** Command was terminated after exceeding output limit (%.2f MB) *****\n" \
@@ -439,6 +440,7 @@ def run(command, ignore_errors=False, timeout=0):
             output += p.stdout.read(settings.max_command_output_size)
         alarm(0)
     except Alarm:
+        ignore_errors = False
         kill_subprocess(p, "excessive runtime")
         output += "\n\n***** Command was terminated after exceeding runtime limit (%s s) *****\n" % timeout
     devnull.close()

-- 
piuparts git repository



More information about the Piuparts-commits mailing list