summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorJeremy Hylton <jeremy@alum.mit.edu>2002-04-19 14:37:07 (GMT)
committerJeremy Hylton <jeremy@alum.mit.edu>2002-04-19 14:37:07 (GMT)
commitc72737e7b6ec3beeecafbef75fbc31e22e0d710b (patch)
tree37a97a61827b02e351eee229e621f669c90ddd6a /Lib
parenta6aa71deec4694cdaf7ee3f72fbd2602335cd781 (diff)
downloadcpython-c72737e7b6ec3beeecafbef75fbc31e22e0d710b.zip
cpython-c72737e7b6ec3beeecafbef75fbc31e22e0d710b.tar.gz
cpython-c72737e7b6ec3beeecafbef75fbc31e22e0d710b.tar.bz2
Fix SF #544995 (zlib crash on second flush call)
Bug fix by mhammond. Bug fix candidate for 2.2, not present in 2.1.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_zlib.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_zlib.py b/Lib/test/test_zlib.py
index 8881516..35bca88 100644
--- a/Lib/test/test_zlib.py
+++ b/Lib/test/test_zlib.py
@@ -41,6 +41,12 @@ buf = buf * 16
co = zlib.compressobj(8, 8, -15)
x1 = co.compress(buf)
x2 = co.flush()
+try:
+ co.flush()
+ print "Oops - second flush worked when it should not have!"
+except zlib.error:
+ pass
+
x = x1 + x2
dc = zlib.decompressobj(-15)