Bugfix: Prevent crash when checking Office/QuickBooks network installers

This commit is contained in:
Alan Mason 2017-12-06 12:50:34 -08:00
parent ac1e839876
commit 5d7cad37e4

View file

@ -164,7 +164,11 @@ def scan_for_net_installers(server, family_name, min_year):
if server['Mounted']:
for year in os.scandir(r'\\{IP}\{Share}'.format(**server)):
if int(year.name) < min_year:
try:
year_ok = int(year.name) < min_year
except ValueError:
year_ok = False # Skip non-year items
if year_ok:
# Don't support outdated installers
continue
for version in os.scandir(year.path):