From 2f1cc5474aa7579d7f804e2ec858a2a42a30e6ef Mon Sep 17 00:00:00 2001 From: Will Kahn-Greene Date: Wed, 13 Sep 2017 10:50:52 -0400 Subject: [PATCH] bug 1399459 - halt if there are no versions (#3983) When fetching normalization data, we really need valid product versions. If there aren't any valid product versions, then we should throw our hands in the air and give up with an error. --- docker/fetch_normalization_data.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/fetch_normalization_data.py b/docker/fetch_normalization_data.py index b3ce1627f6..2f3871d254 100755 --- a/docker/fetch_normalization_data.py +++ b/docker/fetch_normalization_data.py @@ -169,6 +169,9 @@ def main(args): for product in args.products.split(','): # Fetch versions from the product_versions table that we should pull data for versions = get_versions(conn, product) + if not versions: + print('ERROR: No versions to fetch for %s. That seems bad. Exiting.' % product) + return 1 for platform in PLATFORMS: print('Fetching data for (%s, %s, %s)...' % (product, versions, platform))