]> granicus.if.org Git - python/commitdiff
Issue #22834: Drop a redundant comment and use errno instead of an
authorBrett Cannon <brett@python.org>
Fri, 27 Feb 2015 17:13:35 +0000 (12:13 -0500)
committerBrett Cannon <brett@python.org>
Fri, 27 Feb 2015 17:13:35 +0000 (12:13 -0500)
integer.

Thanks to Serhiy Storchaka and Martin Panter for the suggestions.

Lib/test/test_importlib/import_/test_path.py

index f257f117b4791660e15ca4bfafddef2ed77723b1..c246d6973faf623d64b6e4100e6dde341afee3cb 100644 (file)
@@ -3,6 +3,7 @@ from .. import util
 importlib = util.import_importlib('importlib')
 machinery = util.import_importlib('importlib.machinery')
 
+import errno
 import os
 import sys
 import tempfile
@@ -167,8 +168,7 @@ class FinderTests:
             with tempfile.TemporaryDirectory() as path:
                 os.chdir(path)
         except OSError as exc:
-            if exc.errno == 22:
-                # issue #22834
+            if exc.errno == errno.EINVAL:
                 self.skipTest("platform does not allow the deletion of the cwd")
             raise
         with util.import_state(path=['']):