Skip to content

Instantly share code, notes, and snippets.

@oldpatricka
Created March 26, 2012 20:42
Show Gist options
  • Save oldpatricka/2209521 to your computer and use it in GitHub Desktop.
Save oldpatricka/2209521 to your computer and use it in GitHub Desktop.
--- nimbus-ctx-agent-2.3.0.orig/nimbus/ctx/lib/utils.py 2010-09-23 17:44:36.000000000 -0400
+++ nimbus-ctx-agent-2.3.0/nimbus/ctx/lib/utils.py 2012-03-23 19:53:50.000000000 -0500
@@ -134,7 +134,7 @@
self.delay = delay
self.exception = None
self.exit = None
- self.stdout = None
+ self.stdout = str()
self.stderr = None
self.killed = False
self.log = getlog(override=log_override)
@@ -158,6 +158,7 @@
time.sleep(0.2)
if p.poll() != -1:
done = True
+ self.stdout += p.fromchild.read()
self.killtime -= 0.2
if not done and self.killsig != -1:
@@ -177,7 +178,7 @@
else:
self.exit = "UNKNOWN"
- self.stdout = p.fromchild.read()
+ self.stdout += p.fromchild.read()
self.stderr = p.childerr.read()
p.fromchild.close()
p.childerr.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment