fix error when header is empty
catch case of empty header to not crash
This commit is contained in:
parent
315e3647ab
commit
4c5efa4087
1 changed files with 6 additions and 5 deletions
|
@ -68,11 +68,12 @@ class TexFileToFormat:
|
||||||
|
|
||||||
def __format_header(self):
|
def __format_header(self):
|
||||||
new_header = []
|
new_header = []
|
||||||
for line in self.current_build_info.header:
|
if self.current_build_info.header:
|
||||||
new_header.append(line.format(
|
for line in self.current_build_info.header:
|
||||||
source_file=self.src_path.name,
|
new_header.append(line.format(
|
||||||
latex_file_type='package' if '.pysty' in self.src_path.name else 'class'
|
source_file=self.src_path.name,
|
||||||
))
|
latex_file_type='package' if '.pysty' in self.src_path.name else 'class'
|
||||||
|
))
|
||||||
self._header = new_header
|
self._header = new_header
|
||||||
|
|
||||||
def __format(self) -> dict:
|
def __format(self) -> dict:
|
||||||
|
|
Loading…
Reference in a new issue