From 504b6c4c77eaa1e5c529b3060eb48e37abc4b4d7 Mon Sep 17 00:00:00 2001 From: Christophe Benz Date: Tue, 22 Jun 2010 11:50:19 +0200 Subject: [PATCH] return if no columns (if no results) --- weboob/tools/application/formatters/table.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/weboob/tools/application/formatters/table.py b/weboob/tools/application/formatters/table.py index 6e6f1143..b1c6373b 100644 --- a/weboob/tools/application/formatters/table.py +++ b/weboob/tools/application/formatters/table.py @@ -37,6 +37,8 @@ class TableFormatter(IFormatter): self.queue.append(formatted.values()) def flush(self): + if self.column_headers is None: + return None table = PrettyTable(self.column_headers) for column_header in self.column_headers: table.set_field_align(column_header, 'l')