Skip to content

Commit

Permalink
Fix library file generation
Browse files Browse the repository at this point in the history
ref #266
  • Loading branch information
jklmnn committed Jun 2, 2020
1 parent 0b810ac commit 6e50cd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions rflx/generator/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,14 +175,14 @@ def write_library_files(self, directory: Path) -> None:
self.__check_template_file(template_filename)

prefix = file_name(self.prefix)
filename = f"{prefix}-{template_filename}"
filename = f"{prefix}-{template_filename}" if prefix else template_filename

with open(self.template_dir / Path(template_filename)) as template_file:
create_file(
Path(directory) / Path(filename),
self.__license_header()
+ "".join(
l.format(prefix=f"{self.prefix}.")
l.format(prefix=f"{self.prefix}." if self.prefix else "")
for l in template_file
if " -- WORKAROUND" not in l
),
Expand Down

0 comments on commit 6e50cd2

Please sign in to comment.