template = env.get_template(template_name)
content = template.render(kwargs)
sync_out = os.path.join(os.getenv('WORKSPACE'), 'outdir')
- with open(os.path.join(sync_out, 'builddata', 'reports', 'index.html'), 'w') as fp:
+ reports = os.path.join(sync_out, 'builddata', 'reports')
+ if not os.path.exists(reports):
+ return
+ with open(os.path.join(reports, 'index.html'), 'w') as fp:
fp.write(content)
sync(sync_out, os.path.join(os.getenv('IMG_SYNC_DEST_BASE'), repo_path))