fix handling extra header correctly

This commit is contained in:
Maximilian Keßler 2021-12-17 15:34:59 +01:00
parent 4c5efa4087
commit e55a6728a9

View file

@ -96,7 +96,8 @@ class BuildInfo:
or include_pytex_info_text or include_pytex_info_text
or include_timestamp or include_timestamp
or include_pytex_version or include_pytex_version
or include_git_version): or include_git_version
or extra_header):
self._header = None self._header = None
return return
else: else:
@ -113,6 +114,7 @@ class BuildInfo:
self._header += PYTEX_VERSION self._header += PYTEX_VERSION
if include_git_version: if include_git_version:
self._header += SOURCE_CODE_VERSION self._header += SOURCE_CODE_VERSION
if len(self._header) > 0:
self._header += [''] self._header += ['']
if extra_header: if extra_header:
self._header += extra_header + [''] self._header += extra_header + ['']