Project

General

Profile

Bug #1458

test_core_go hangs

Added by Rogers, Chris about 10 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
common_py
Target version:
Start date:
17 April 2014
Due date:
% Done:

100%

Estimated time:
Workflow:
New Issue

Description

For some reason, test_core_go was hanging on Celeste's machine. We nailed the problem down to some issue with the subprocess handling used to extract bzr information into the job header. No idea why this is happening, but the following diff seemed to fix things.

=== modified file 'src/common_py/Go.py'
--- src/common_py/Go.py    2012-11-22 10:36:21 +0000
+++ src/common_py/Go.py    2014-04-17 13:07:58 +0000
@@ -201,10 +201,7 @@
             pass
         try:
             mrd = os.environ["MAUS_ROOT_DIR"]
-            proc = subprocess.Popen(['bzr', 'status', mrd],
-                               stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
-            proc.wait()
-            bzr_status = proc.stdout.read()
+            bzr_status = subprocess.check_output(['bzr', 'status', mrd], stderr=subprocess.STDOUT)
         except (OSError, IOError):
             pass
         maus_version = json_datacards["maus_version"]

Also available in: Atom PDF