From 64d940c735464364821a9d8b99d9b5831a28d26d Mon Sep 17 00:00:00 2001 From: Jairo Llopis Date: Mon, 22 Aug 2016 11:01:45 +0200 Subject: [PATCH] [FIX][report_xls] Fix regression introduced in 65223f4. Variables are now at module level because they have to be mocked when there is an `ImportError`, so we got an `AttributeError` when trying to use them. --- report_xls/report_xls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/report_xls/report_xls.py b/report_xls/report_xls.py index 9284b8b0..0a17b862 100644 --- a/report_xls/report_xls.py +++ b/report_xls/report_xls.py @@ -208,7 +208,7 @@ class report_xls(report_sxw): c.append({'formula': s[5]}) else: c.append({ - 'write_cell_func': report_xls.xls_types[c[3]]}) + 'write_cell_func': xls_types[c[3]]}) # Set custom cell style if s_len > 6 and s[6] is not None: c.append(s[6]) @@ -237,7 +237,7 @@ class report_xls(report_sxw): style = spec[6] and spec[6] or row_style if not data: # if no data, use default values - data = report_xls.xls_types_default[spec[3]] + data = xls_types_default[spec[3]] if size != 1: if formula: ws.write_merge(