summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
Diffstat (limited to 'Lib')
-rw-r--r--Lib/distutils/cygwinccompiler.py8
-rw-r--r--Lib/test/test_os.py2
2 files changed, 5 insertions, 5 deletions
diff --git a/Lib/distutils/cygwinccompiler.py b/Lib/distutils/cygwinccompiler.py
index da2c74a..ea4c797 100644
--- a/Lib/distutils/cygwinccompiler.py
+++ b/Lib/distutils/cygwinccompiler.py
@@ -400,7 +400,7 @@ def get_versions():
""" Try to find out the versions of gcc, ld and dllwrap.
If not possible it returns None for it.
"""
- from distutils.version import StrictVersion
+ from distutils.version import LooseVersion
from distutils.spawn import find_executable
import re
@@ -411,7 +411,7 @@ def get_versions():
out.close()
result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII)
if result:
- gcc_version = StrictVersion(result.group(1))
+ gcc_version = LooseVersion(result.group(1))
else:
gcc_version = None
else:
@@ -423,7 +423,7 @@ def get_versions():
out.close()
result = re.search('(\d+\.\d+(\.\d+)*)', out_string, re.ASCII)
if result:
- ld_version = StrictVersion(result.group(1))
+ ld_version = LooseVersion(result.group(1))
else:
ld_version = None
else:
@@ -435,7 +435,7 @@ def get_versions():
out.close()
result = re.search(' (\d+\.\d+(\.\d+)*)', out_string, re.ASCII)
if result:
- dllwrap_version = StrictVersion(result.group(1))
+ dllwrap_version = LooseVersion(result.group(1))
else:
dllwrap_version = None
else:
diff --git a/Lib/test/test_os.py b/Lib/test/test_os.py
index ca23dba..3dffcb2 100644
--- a/Lib/test/test_os.py
+++ b/Lib/test/test_os.py
@@ -318,7 +318,7 @@ class StatAttributeTests(unittest.TestCase):
try:
os.stat(r"c:\pagefile.sys")
except WindowsError as e:
- if e == 2: # file does not exist; cannot run test
+ if e.errno == 2: # file does not exist; cannot run test
return
self.fail("Could not stat pagefile.sys")