From 09e88cfb19ade32dcdb043d2ccb9554a2707e132 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 4 Feb 2011 14:05:47 +0000 Subject: [PATCH] fix for a bug reported by zack.payton@executiveinstruments.com (object of type 'NoneType' has no len()) --- lib/core/dump.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/dump.py b/lib/core/dump.py index d89db6623..dd486a754 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -148,7 +148,7 @@ class Dump: if isinstance(table, (list, tuple, set)): table = table[0] - maxlength = max(maxlength, len(table)) + maxlength = max(maxlength, len(str(table))) lines = "-" * (int(maxlength) + 2) @@ -168,7 +168,7 @@ class Dump: if isinstance(table, (list, tuple, set)): table = table[0] - blank = " " * (maxlength - len(table)) + blank = " " * (maxlength - len(str(table))) self.__write("| %s%s |" % (table, blank)) self.__write("+%s+\n" % lines)