import os
import random
import string
+import sys
import yaml
s3 = bunch.Bunch()
# For those scripts that use a context, these are pretty univerally needed.
context = bunch.Bunch(
bucket = None,
+
+ # Save stdout/stderr in case they get fudged with.
+ real_stdout = sys.stdout,
+ real_stderr = sys.stderr,
)
bucket_counter = itertools.count(1)
""" A quick little greenlet to always run and dump results. """
def __init__(self):
gevent.Greenlet.__init__(self)
- self.outfile = sys.stderr
+ self.outfile = context.real_stdout
def _run(self):
while True: