1
0
Fork 0

Check if thumbnail exists in package before building thumbnail_url (which

is never actually used by the way.)
This commit is contained in:
Curtis L. Olson 2017-09-26 06:30:50 -05:00
parent 68e2df9db6
commit 89d526e740

View file

@ -144,6 +144,9 @@ def process_aircraft_dir(name, repo_path):
package_node = catalog.make_aircraft_node(name, package, variants, download_base)
download_url = download_base + name + '.zip'
if 'thumbnail' in package:
# this is never even used, but breaks the script by assuming
# all aircraft packages have thumbnails defined?
thumbnail_url = download_base + 'thumbnails/' + name + '_' + package['thumbnail']
# get cached md5sum if it exists
@ -301,6 +304,7 @@ for scm in scm_list:
continue
# process each aircraft in turn
# print name, repo_path
process_aircraft_dir(name, repo_path)
# write out the master catalog file