Issue #10276: Fix test_zlib, m may be undefined in the finally block

This commit is contained in:
Victor Stinner 2011-05-03 17:25:28 +02:00
parent f9fb43492c
commit e4163e2c8d
1 changed files with 1 additions and 1 deletions

View File

@ -88,8 +88,8 @@ class ChecksumBigBufferTestCase(unittest.TestCase):
f.seek(self.int_max-4)
f.write("asdf")
f.flush()
m = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
try:
m = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_READ)
self.assertEqual(zlib.crc32(m), 0x709418e7)
self.assertEqual(zlib.adler32(m), -2072837729)
finally: