From 209248ae8d01ef4690f7579f0bb8cdc3ada25a88 Mon Sep 17 00:00:00 2001 From: Henning Kleen Date: Mon, 11 Jul 2022 15:21:27 +0200 Subject: [PATCH] also expand environment variables in design report template path --- kibot/out_report.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/kibot/out_report.py b/kibot/out_report.py index fecbeefd..8d0f4ddc 100644 --- a/kibot/out_report.py +++ b/kibot/out_report.py @@ -212,6 +212,8 @@ class ReportOptions(BaseOptions): if self.template.lower() in ('full', 'simple', 'full_svg'): self.template = os.path.abspath(os.path.join(os.path.dirname(__file__), 'report_templates', 'report_'+self.template.lower()+'.txt')) + if not os.path.isabs(self.template): + self.template = os.path.expandvars(os.path.expanduser(self.template)) if not os.path.isfile(self.template): raise KiPlotConfigurationError("Missing report template: `{}`".format(self.template)) m = re.match(r'(\d+)([A-F])', self.eurocircuits_class_target)