From f68ac601ef28b1aa27d14a0dcdd5c9fdf934b6d3 Mon Sep 17 00:00:00 2001 From: Alexander Sulfrian Date: Tue, 2 Feb 2016 03:48:04 +0100 Subject: utils/console: Allow empty output with TablePrinter --- accounts/utils/console.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/accounts/utils/console.py b/accounts/utils/console.py index 9996faa..8af3fb3 100644 --- a/accounts/utils/console.py +++ b/accounts/utils/console.py @@ -60,7 +60,8 @@ class TablePrinter(object): self.separator) def output(self, rows): - self._calulate_widths(rows) + if len(rows) > 0: + self._calulate_widths(rows) if self.headers is not None: self._print_row(self.headers) -- cgit v1.2.3-1-g7c22