[Bug #945063] Get file extension correct. (2.3 bugfix candidate)
This commit is contained in:
parent
67a521ef69
commit
30633c9a64
|
@ -274,7 +274,7 @@ class Hook:
|
||||||
|
|
||||||
if self.logdir is not None:
|
if self.logdir is not None:
|
||||||
import os, tempfile
|
import os, tempfile
|
||||||
suffix = ['.html', '.txt'][self.format=="html"]
|
suffix = ['.txt', '.html'][self.format=="html"]
|
||||||
(fd, path) = tempfile.mkstemp(suffix=suffix, dir=self.logdir)
|
(fd, path) = tempfile.mkstemp(suffix=suffix, dir=self.logdir)
|
||||||
try:
|
try:
|
||||||
file = os.fdopen(fd, 'w')
|
file = os.fdopen(fd, 'w')
|
||||||
|
|
Loading…
Reference in New Issue