Issue #16714: use 'raise' exceptions, don't 'throw'.

Patch by Serhiy Storchaka.
This commit is contained in:
Andrew Svetlov 2012-12-18 21:26:36 +02:00
commit 5b89840d9c
42 changed files with 64 additions and 64 deletions

View file

@ -824,7 +824,7 @@ class PosixTester(unittest.TestCase):
posix.rename(support.TESTFN + 'ren', support.TESTFN)
raise
else:
posix.stat(support.TESTFN) # should not throw exception
posix.stat(support.TESTFN) # should not raise exception
finally:
posix.close(f)
@ -842,7 +842,7 @@ class PosixTester(unittest.TestCase):
def test_unlink_dir_fd(self):
f = posix.open(posix.getcwd(), posix.O_RDONLY)
support.create_empty_file(support.TESTFN + 'del')
posix.stat(support.TESTFN + 'del') # should not throw exception
posix.stat(support.TESTFN + 'del') # should not raise exception
try:
posix.unlink(support.TESTFN + 'del', dir_fd=f)
except: