]> git.ipfire.org Git - thirdparty/tornado.git/commit
reset() only set current position back to 0. What we want here is truncate(). 203/head
authorDidip Kerabat <didip@didip-osx.local>
Mon, 10 Jan 2011 19:56:28 +0000 (11:56 -0800)
committerDidip Kerabat <didip@didip-osx.local>
Mon, 10 Jan 2011 19:56:28 +0000 (11:56 -0800)
commitbba5a45c3f3e5d4bc24e0ba8e30f4a55b5468b7f
tree3a271f18ee3eed127c0d1b9e8837fed6de82fce3
parent2514e88a4c79d751168726ea05f24e0064fdba5b
reset() only set current position back to 0. What we want here is truncate().

But, per http://stackoverflow.com/questions/4330812/how-do-i-clear-a-stringio-object discussion, creating new StringIO() is cheaper.
tornado/iostream.py