Commit ccd9e75b authored by Barry Warsaw's avatar Barry Warsaw

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
parent 1a5b9562
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment