]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
use stderr for non-yml output in readwrite tool
authorSteven Berler <steven.berler@dreamhost.com>
Fri, 22 Jul 2011 21:18:09 +0000 (14:18 -0700)
committerTommi Virtanen <tommi.virtanen@dreamhost.com>
Tue, 26 Jul 2011 21:20:28 +0000 (14:20 -0700)
stdout should now only contain the yml output.

s3tests/rand_readwrite.py

index 7796ce3195ac7bc1539f8375a30751dad3136688..c163f5a724a8fce6228860db7c30d7e23975396e 100644 (file)
@@ -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