improve postprocessor initialization code

This commit is contained in:
Mike Fährmann
2018-06-07 22:29:54 +02:00
parent b344f2290f
commit 7646bdbcfd
2 changed files with 37 additions and 24 deletions

View File

@@ -425,6 +425,7 @@ class PathFormat():
def set_keywords(self, keywords):
"""Set filename keywords"""
self.keywords = keywords
self.temppath = ""
self.has_extension = bool(keywords.get("extension"))
if self.has_extension:
self.build_path()
@@ -455,7 +456,6 @@ class PathFormat():
self.temppath = self.realpath + ".part"
else:
self.set_extension("part", False)
self.temppath = self.realpath
if part_directory:
self.temppath = os.path.join(
part_directory,