From fc76c5f32d9151fd2405a95ef57c9b9e8d4a762b Mon Sep 17 00:00:00 2001 From: Gabriel Studer <gabriel.studer@stud.unibas.ch> Date: Fri, 10 Aug 2012 10:45:36 +0200 Subject: [PATCH] col_name is already added at the beginning, so it wouldn't enter the elif in case of an empty table (what we actually want...) --- modules/base/pymod/table.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/base/pymod/table.py b/modules/base/pymod/table.py index 8795799ce..e3e9a56cb 100644 --- a/modules/base/pymod/table.py +++ b/modules/base/pymod/table.py @@ -657,7 +657,7 @@ class Table(object): for row, d in zip(self.rows, data): row.append(d) - elif data!=None and len(self.col_names)==0: + elif data!=None and len(self.col_names)==1: if IsScalar(data): self.AddRow({col_name : data}) else: -- GitLab