Check if thumbnail exists in package before building thumbnail_url (which
is never actually used by the way.)
This commit is contained in:
parent
68e2df9db6
commit
89d526e740
1 changed files with 5 additions and 1 deletions
|
@ -144,6 +144,9 @@ def process_aircraft_dir(name, repo_path):
|
||||||
package_node = catalog.make_aircraft_node(name, package, variants, download_base)
|
package_node = catalog.make_aircraft_node(name, package, variants, download_base)
|
||||||
|
|
||||||
download_url = download_base + name + '.zip'
|
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']
|
thumbnail_url = download_base + 'thumbnails/' + name + '_' + package['thumbnail']
|
||||||
|
|
||||||
# get cached md5sum if it exists
|
# get cached md5sum if it exists
|
||||||
|
@ -301,6 +304,7 @@ for scm in scm_list:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
# process each aircraft in turn
|
# process each aircraft in turn
|
||||||
|
# print name, repo_path
|
||||||
process_aircraft_dir(name, repo_path)
|
process_aircraft_dir(name, repo_path)
|
||||||
|
|
||||||
# write out the master catalog file
|
# write out the master catalog file
|
||||||
|
|
Loading…
Reference in a new issue