mirror of
https://git.yoctoproject.org/meta-arm
synced 2026-01-12 03:10:15 +00:00
scripts/machine-summary: remove default Format.render()
There's no shared code anymore, so move the code to TextOverview. Signed-off-by: Ross Burton <ross.burton@arm.com>
This commit is contained in:
@@ -142,9 +142,7 @@ class Format:
|
||||
return cls.registry[name]()
|
||||
|
||||
def render(self, context, output: pathlib.Path):
|
||||
# Default implementation for convenience
|
||||
with open(output, "wt") as f:
|
||||
f.write(self.get_template(f"machine-summary-{self.name}.jinja").render(context))
|
||||
pass
|
||||
|
||||
def get_template(self, name):
|
||||
template_dir = os.path.dirname(os.path.abspath(__file__))
|
||||
@@ -160,6 +158,10 @@ class Format:
|
||||
class TextOverview(Format):
|
||||
name = "overview.txt"
|
||||
|
||||
def render(self, context, output: pathlib.Path):
|
||||
with open(output, "wt") as f:
|
||||
f.write(self.get_template(f"machine-summary-overview.txt.jinja").render(context))
|
||||
|
||||
class HtmlUpdates(Format):
|
||||
name = "report"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user