From: Steven Berler Date: Fri, 22 Jul 2011 21:18:09 +0000 (-0700) Subject: use stderr for non-yml output in readwrite tool X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=0c0c590d47c6e95029fe384e1db6698d19cf2bdd;p=s3-tests.git use stderr for non-yml output in readwrite tool stdout should now only contain the yml output. --- diff --git a/s3tests/rand_readwrite.py b/s3tests/rand_readwrite.py index 7796ce31..c163f5a7 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