[KiKit Present] Removed the try in boardpage

- Too broad, doesn't help
This commit is contained in:
Salvador E. Tropea 2022-12-04 11:32:58 -03:00
parent 266cf0a6a4
commit b3d664fa94
2 changed files with 11 additions and 19 deletions

View File

@ -198,3 +198,4 @@ No current changes
This file comes from KiKit, but it has too much in common with `populate.py`.
- Removed `click` import, unused
- Removed the try in boardpage, too broad, doesn't help

View File

@ -177,22 +177,13 @@ class HtmlTemplate(Template):
outFile.write(content)
def boardpage(outdir, description, board, resource, template, repository, name):
try:
Path(outdir).mkdir(parents=True, exist_ok=True)
template = readTemplate(template)
template.addDescriptionFile(description)
template.setRepository(repository)
template.setName(name)
for r in resource:
template.addResource(r)
for name, comment, file in board:
template.addBoard(name, comment, file)
template.render(outdir)
except Exception as e:
sys.stderr.write("An error occurred: " + str(e) + "\n")
sys.exit(1)
Path(outdir).mkdir(parents=True, exist_ok=True)
template = readTemplate(template)
template.addDescriptionFile(description)
template.setRepository(repository)
template.setName(name)
for r in resource:
template.addResource(r)
for name, comment, file in board:
template.addBoard(name, comment, file)
template.render(outdir)