From 0c0c590d47c6e95029fe384e1db6698d19cf2bdd Mon Sep 17 00:00:00 2001 From: Steven Berler Date: Fri, 22 Jul 2011 14:18:09 -0700 Subject: [PATCH] use stderr for non-yml output in readwrite tool stdout should now only contain the yml output. --- s3tests/rand_readwrite.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/s3tests/rand_readwrite.py b/s3tests/rand_readwrite.py index 7796ce3..c163f5a 100644 --- a/s3tests/rand_readwrite.py +++ b/s3tests/rand_readwrite.py @@ -142,6 +142,8 @@ def main(): try: # setup + real_stdout = sys.stdout + sys.stdout = sys.stderr common.setup() bucket = common.get_new_bucket() print "Created bucket: {name}".format(name=bucket.name) @@ -198,7 +200,7 @@ def main(): q.put(StopIteration) gevent.spawn_later(options.duration, stop) - yaml.safe_dump_all(q, stream=sys.stdout) + yaml.safe_dump_all(q, stream=real_stdout) finally: # cleanup