Avoid crash if VCR+ installers are missing

This commit is contained in:
2Shirt 2018-05-14 08:01:09 -06:00
parent ebffd2a2dd
commit e751696307

View file

@ -272,7 +272,11 @@ def install_vcredists():
"""Install all supported Visual C++ runtimes."""
extract_item('_vcredists', silent=True)
prev_dir = os.getcwd()
os.chdir(r'{BinDir}\_vcredists'.format(**global_vars))
try:
os.chdir(r'{BinDir}\_vcredists'.format(**global_vars))
except FileNotFoundError:
# Ignored since the loop below will report the errors
pass
for vcr in VCR_REDISTS:
try_and_print(message=vcr['Name'], function=run_program,
cmd=vcr['Cmd'], other_results=OTHER_RESULTS)