From 8afaac709a63882dfb46e4555c405f4f67f1cfca Mon Sep 17 00:00:00 2001 From: Florent Aide Date: Mon, 1 Jun 2015 15:20:12 +0200 Subject: [PATCH] pep ftw --HG-- branch : odoo8 --- py3o_parser.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/py3o_parser.py b/py3o_parser.py index 8f1d6de1..6414071b 100644 --- a/py3o_parser.py +++ b/py3o_parser.py @@ -37,7 +37,7 @@ def py3o_report_extender(report_name): class Py3oParser(report_sxw): """Custom class that use Py3o to render libroffice reports. - Code partially taken from CampToCamp.""" + Code partially taken from CampToCamp's webkit_report.""" def __init__(self, name, table, rml=False, parser=rml_parse, header=False, store=False, register=True): @@ -84,10 +84,11 @@ class Py3oParser(report_sxw): filetype = report_xml.py3o_fusion_filetype # py3o.template operates on filenames so create temporary files. - with NamedTemporaryFile(suffix='.odt', prefix='py3o-template-') as \ - in_temp, \ - NamedTemporaryFile(suffix='.odt', prefix='py3o-report-') as \ - out_temp: + with NamedTemporaryFile( + suffix='.odt', + prefix='py3o-template-') as in_temp, NamedTemporaryFile( + suffix='.odt', + prefix='py3o-report-') as out_temp: in_temp.write(b64decode(template.py3o_template_data)) in_temp.flush() @@ -153,4 +154,4 @@ class Py3oParser(report_sxw): if not result: return False, False - return result \ No newline at end of file + return result