Skip to content

Commit

Permalink
refactor: match python style to linter requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
kfsone committed Jun 6, 2024
1 parent bfb9950 commit 41d50bb
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions cpython-windows/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,10 @@ def find_vswhere():


def find_vs_path(path, msvc_version):
""" Attempts to find 'path' by invoking vswhere to identify where the
given msvc_version is installed. """
"""
Attempts to find 'path' by invoking vswhere to identify where the
given msvc_version is installed.
"""
vswhere = find_vswhere()

if msvc_version == "2019":
Expand All @@ -248,12 +250,12 @@ def find_vs_path(path, msvc_version):
]
p = subprocess.check_output(cmdline)
if not p:
cmd = ' '.join('"%s"' % i for i in cmdline)
cmd = " ".join('"%s"' % i for i in cmdline)
print("could not find visual studio (using '%s')" % cmd)
sys.exit(1)

p = p.strip().decode("utf-8")
if '\n' in p: # more than one line
if "\n" in p: # more than one line
print("found multiple matching instances of visual studio %s:" % msvc_version)
print(p)
sys.exit(1)
Expand Down

0 comments on commit 41d50bb

Please sign in to comment.