Replace also altsep in report name for issue1270

Use extsep instead of '.'
This commit is contained in:
Cédric Krier committed 2009-11-03 11:55:21 +01:00
1 parent 60d4b6275f
commit 9b76e1e792
1 file changed
+3 -1
+3 -1
View File
@@ -54,7 +54,9 @@ class Action(object):
if not print_p and direct_print:
print_p = True
dtemp = tempfile.mkdtemp(prefix='tryton_')
fp_name = os.path.join(dtemp, name.replace(os.sep, '_') + '.' + type)
fp_name = os.path.join(dtemp,
name.replace(os.sep, '_').replace(os.altsep or os.sep, '_') \
+ os.extsep + type)
file_d = open(fp_name, 'wb')
file_d.write(base64.decodestring(data))
file_d.close()