[python wmlparser] don't use .cfg suffix for temp path

This commit is contained in:
Elias Pschernig 2010-07-21 16:43:36 +00:00
parent 5b181dd4d8
commit 967f801fd2

View File

@ -206,9 +206,7 @@ class Parser:
If this is not called then the .parse method will assume the If this is not called then the .parse method will assume the
WML is already preprocessed. WML is already preprocessed.
""" """
output = tempfile.NamedTemporaryFile(prefix = "wmlparser_", output = tempfile.mkdtemp(prefix="wmlparser_")
suffix = ".cfg").name
if not os.path.exists(output): os.mkdir(output)
p_option = "-p=" + defines if defines else "-p " p_option = "-p=" + defines if defines else "-p "
commandline = [self.wesnoth_exe, p_option, self.path, commandline = [self.wesnoth_exe, p_option, self.path,
output] output]