[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
WML is already preprocessed.
"""
output = tempfile.NamedTemporaryFile(prefix = "wmlparser_",
suffix = ".cfg").name
if not os.path.exists(output): os.mkdir(output)
output = tempfile.mkdtemp(prefix="wmlparser_")
p_option = "-p=" + defines if defines else "-p "
commandline = [self.wesnoth_exe, p_option, self.path,
output]