From 5d7cad37e4fb6fff93baac4faf6263a2b814344d Mon Sep 17 00:00:00 2001 From: Alan Mason <1923621+2Shirt@users.noreply.github.com> Date: Wed, 6 Dec 2017 12:50:34 -0800 Subject: [PATCH] Bugfix: Prevent crash when checking Office/QuickBooks network installers --- .bin/Scripts/functions/update.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.bin/Scripts/functions/update.py b/.bin/Scripts/functions/update.py index 4531b406..ad1cf00e 100644 --- a/.bin/Scripts/functions/update.py +++ b/.bin/Scripts/functions/update.py @@ -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):