From 9d9bb51ab11ca01fd1ac9f51b129dd8b1b32591a Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Tue, 28 May 2019 14:53:27 -0700 Subject: [PATCH] Don't attempt to parse a dist we could not replicate! Addresses #19. --- installinstallmacos.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/installinstallmacos.py b/installinstallmacos.py index 07f42d2..05bad4e 100755 --- a/installinstallmacos.py +++ b/installinstallmacos.py @@ -393,9 +393,10 @@ def os_installer_product_info(catalog, workdir, ignore_cache=False): except ReplicationError as err: print('Could not replicate %s: %s' % (dist_url, err), file=sys.stderr) - dist_info = parse_dist(dist_path) - product_info[product_key]['DistributionPath'] = dist_path - product_info[product_key].update(dist_info) + else: + dist_info = parse_dist(dist_path) + product_info[product_key]['DistributionPath'] = dist_path + product_info[product_key].update(dist_info) return product_info