Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6cadd13

Browse files
committed
Fix some typo/syntax errors when converting dict access to a function in manifest generation.
1 parent 7d1612d commit 6cadd13

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

numpy/distutils/mingw32ccompiler.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,9 @@ def msvcrt_version(num):
252252
try:
253253
import msvcrt
254254
if hasattr(msvcrt, "CRT_ASSEMBLY_VERSION"):
255-
_MSVCRVER_TO_FULLVER = {'90': msvcrt.CRT_ASSEMBLY_VERSION}
255+
_MSVCRVER_TO_FULLVER['90'] = msvcrt.CRT_ASSEMBLY_VERSION
256256
else:
257-
_MSVCRVER_TO_FULLVER = {'90': "9.0.21022.8"}
257+
_MSVCRVER_TO_FULLVER['90'] = "9.0.21022.8"
258258
except ImportError:
259259
# If we are here, means python was not built with MSVC. Not sure what to do
260260
# in that case: manifest building will fail, but it should not be used in
@@ -265,7 +265,7 @@ def msvc_manifest_xml(maj, min):
265265
"""Given a major and minor version of the MSVCR, returns the
266266
corresponding XML file."""
267267
try:
268-
fullver = msvcrt_version[str(maj * 10 + min)]
268+
fullver = msvcrt_version(str(maj * 10 + min))
269269
except KeyError:
270270
raise ValueError("Version %d,%d of MSVCRT not supported yet" \
271271
% (maj, min))

0 commit comments

Comments
 (0)