Tools: generate_manifest.py non-fatal if not all vehicle dirs exist

This commit is contained in:
Peter Barker 2017-09-05 08:59:21 +10:00
parent 0f99196972
commit 5d02dc4a30
1 changed files with 5 additions and 1 deletions

View File

@ -203,7 +203,11 @@ class ManifestGenerator():
# used to listdir basedir here, but since this is also a web document root, there's a lot of other stuff accumulated... # used to listdir basedir here, but since this is also a web document root, there's a lot of other stuff accumulated...
vehicletypes = [ 'AntennaTracker', 'Copter', 'Plane', 'Rover', 'Sub' ] vehicletypes = [ 'AntennaTracker', 'Copter', 'Plane', 'Rover', 'Sub' ]
for vehicletype in vehicletypes: for vehicletype in vehicletypes:
try:
vdir = os.listdir(os.path.join(basedir, vehicletype)) vdir = os.listdir(os.path.join(basedir, vehicletype))
except OSError as e:
if e.errno == 2:
continue
for firstlevel in vdir: for firstlevel in vdir:
if firstlevel == "files.html": if firstlevel == "files.html":
# generated file which should be ignored # generated file which should be ignored