support unicode chars in export to stdout
This commit is contained in:
parent
41c1e618bb
commit
18a4d68b5c
|
@ -168,7 +168,8 @@ def export(project_id, output_file=None, export_format=None):
|
||||||
if not export_format:
|
if not export_format:
|
||||||
export_format = 'tsv'
|
export_format = 'tsv'
|
||||||
if not output_file:
|
if not output_file:
|
||||||
sys.stdout.write(project.export(export_format=export_format).read())
|
sys.stdout.write(project.export(
|
||||||
|
export_format=export_format).read().decode('UTF-8'))
|
||||||
else:
|
else:
|
||||||
ext = os.path.splitext(output_file)[1][1:]
|
ext = os.path.splitext(output_file)[1][1:]
|
||||||
if ext:
|
if ext:
|
||||||
|
@ -264,7 +265,7 @@ def templating(project_id,
|
||||||
if not splitToFiles:
|
if not splitToFiles:
|
||||||
if not output_file:
|
if not output_file:
|
||||||
sys.stdout.write(project.export_templating(
|
sys.stdout.write(project.export_templating(
|
||||||
**templateconfig).read())
|
**templateconfig).read().decode('UTF-8'))
|
||||||
else:
|
else:
|
||||||
with open(output_file, 'wb') as f:
|
with open(output_file, 'wb') as f:
|
||||||
f.write(project.export_templating(**templateconfig).read())
|
f.write(project.export_templating(**templateconfig).read())
|
||||||
|
|
Loading…
Reference in New Issue