use stderr for non-yml output in readwrite tool

stdout should now only contain the yml output.
This commit is contained in:
Steven Berler 2011-07-22 14:18:09 -07:00 committed by Tommi Virtanen
parent 33876b0dae
commit 0c0c590d47

View file

@ -142,6 +142,8 @@ def main():
try: try:
# setup # setup
real_stdout = sys.stdout
sys.stdout = sys.stderr
common.setup() common.setup()
bucket = common.get_new_bucket() bucket = common.get_new_bucket()
print "Created bucket: {name}".format(name=bucket.name) print "Created bucket: {name}".format(name=bucket.name)
@ -198,7 +200,7 @@ def main():
q.put(StopIteration) q.put(StopIteration)
gevent.spawn_later(options.duration, stop) gevent.spawn_later(options.duration, stop)
yaml.safe_dump_all(q, stream=sys.stdout) yaml.safe_dump_all(q, stream=real_stdout)
finally: finally:
# cleanup # cleanup