• Barry Warsaw's avatar
    test_both(): I believe this was a typo: m is only defined if no · ccd9e75b
    Barry Warsaw yazdı
    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
    ccd9e75b
test_mmap.py 9.48 KB