Adapt file mode depending on data type in soffice conversion
issue8848 review278211002
This commit is contained in:
1 parent
dfd71fae7c
commit
2709bf2fa9
1 file changed
+2
-1
@@ -320,7 +320,8 @@ class Report(URLMixin, PoolBase):
|
||||
path = os.path.join(
|
||||
dtemp, report.report_name + os.extsep + input_format)
|
||||
oext = FORMAT2EXT.get(output_format, output_format)
|
||||
with open(path, 'wb+') as fp:
|
||||
mode = 'w+' if isinstance(data, str) else 'wb+'
|
||||
with open(path, mode) as fp:
|
||||
fp.write(data)
|
||||
try:
|
||||
cmd = ['soffice',
|
||||
|
||||
Reference in new issue
Block a user