[Piuparts-commits] [SCM] piuparts git repository branch, develop, updated. 0.44-792-ge089177

Andreas Beckmann debian at abeckmann.de
Mon Jun 18 21:35:16 UTC 2012


The following commit has been merged in the develop branch:
commit 2b2af8409b1c880f7d25da75511582917a6efdf5
Author: Andreas Beckmann <debian at abeckmann.de>
Date:   Fri Jun 15 19:09:58 2012 +0200

    p-s: reindent run_test_with_timeout()
    
    Signed-off-by: Andreas Beckmann <debian at abeckmann.de>

diff --git a/piuparts-slave.py b/piuparts-slave.py
index c0d56df..b8b59ea 100644
--- a/piuparts-slave.py
+++ b/piuparts-slave.py
@@ -447,18 +447,18 @@ def get_process_children(pid):
     return [int(p) for p in stdout.split()]
 
 def run_test_with_timeout(cmd, maxwait, kill_all=True):
-      logging.debug("Executing: %s" % " ".join(cmd))
+    logging.debug("Executing: %s" % " ".join(cmd))
 
-      stdout = ""
-      p = subprocess.Popen(cmd,
+    stdout = ""
+    p = subprocess.Popen(cmd,
                          stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-      if maxwait > 0:
-          signal(SIGALRM, alarm_handler)
-          alarm(maxwait)
-      try:
-          stdout, stderr = p.communicate()
-          alarm(0)
-      except Alarm:
+    if maxwait > 0:
+        signal(SIGALRM, alarm_handler)
+        alarm(maxwait)
+    try:
+        stdout, stderr = p.communicate()
+        alarm(0)
+    except Alarm:
           pids = [p.pid]
           if kill_all:
               pids.extend(get_process_children(p.pid))
@@ -470,7 +470,7 @@ def run_test_with_timeout(cmd, maxwait, kill_all=True):
                       pass
           return -1,stdout
 
-      return p.returncode,stdout
+    return p.returncode,stdout
 
 
 def test_package(config, package, packages_files):

-- 
piuparts git repository



More information about the Piuparts-commits mailing list