Kaydet (Commit) 8004e857 authored tarafından Brett Cannon's avatar Brett Cannon

Issue #22834: Drop a redundant comment and use errno instead of an

integer.

Thanks to Serhiy Storchaka and Martin Panter for the suggestions.
üst e2bda9ad
...@@ -3,6 +3,7 @@ from .. import util ...@@ -3,6 +3,7 @@ from .. import util
importlib = util.import_importlib('importlib') importlib = util.import_importlib('importlib')
machinery = util.import_importlib('importlib.machinery') machinery = util.import_importlib('importlib.machinery')
import errno
import os import os
import sys import sys
import tempfile import tempfile
...@@ -167,8 +168,7 @@ class FinderTests: ...@@ -167,8 +168,7 @@ class FinderTests:
with tempfile.TemporaryDirectory() as path: with tempfile.TemporaryDirectory() as path:
os.chdir(path) os.chdir(path)
except OSError as exc: except OSError as exc:
if exc.errno == 22: if exc.errno == errno.EINVAL:
# issue #22834
self.skipTest("platform does not allow the deletion of the cwd") self.skipTest("platform does not allow the deletion of the cwd")
raise raise
with util.import_state(path=['']): with util.import_state(path=['']):
......
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