]> granicus.if.org Git - python/commit
test_both(): I believe this was a typo: m is only defined if no
authorBarry Warsaw <barry@python.org>
Wed, 11 Sep 2002 02:56:42 +0000 (02:56 +0000)
committerBarry Warsaw <barry@python.org>
Wed, 11 Sep 2002 02:56:42 +0000 (02:56 +0000)
commitccd9e75b189c8084b08af797c5711938685b8b5b
tree208c38404f0d729ed75e13f496d9333296b5731b
parent1a5b9562d62be4fac4bea7b604f4d921f284a817
test_both(): I believe this was a typo: m is only defined if no
exception occurred so it should only be closed in the else clause.
Without this change we can an UnboundLocalError on Linux:

Traceback (most recent call last):
  File "Lib/test/test_mmap.py", line 304, in ?
    test_both()
  File "Lib/test/test_mmap.py", line 208, in test_both
    m.close()
UnboundLocalError: local variable 'm' referenced before assignment
Lib/test/test_mmap.py