also expand environment variables in design report template path
This commit is contained in:
parent
7ba7794a14
commit
209248ae8d
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue