Fix the breakage of Lib/tarfile.py on non-Windows platforms due to

using WindowsError in a try/except. Only add WindowsError to the list of
exceptions to catch when we are actually running on Windows.

Additionally, add a call that was left out in test_posixpath.

Thanks Amaury, Antoine, and Jason.
This commit is contained in:
Brian Curtin 2010-07-09 13:54:27 +00:00
parent 4b83af9576
commit 16633fa497
2 changed files with 15 additions and 6 deletions

View file

@ -208,6 +208,7 @@ class PosixPathTest(unittest.TestCase):
def test_samestat_on_links(self):
test_fn1 = support.TESTFN + "1"
test_fn2 = support.TESTFN + "2"
self._create_file(test_fn1)
test_fns = (test_fn1, test_fn2)
os.symlink(*test_fns)
stats = map(os.stat, test_fns)