From 813f44da16c50f63044f2f1b263d455e3f307946 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Tue, 19 Oct 2010 22:11:17 +0000 Subject: [PATCH] Minor bug fix for MSSQL connector --tables option --- lib/core/dump.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lib/core/dump.py b/lib/core/dump.py index dabe9f3a7..38839754e 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -172,12 +172,15 @@ class Dump: for tables in dbTables.values(): for table in tables: + if isinstance(table, (list, tuple, set)): + table = table[0] + maxlength = max(maxlength, len(table)) lines = "-" * (int(maxlength) + 2) for db, tables in dbTables.items(): - tables.sort(key=lambda x: x.lower()) + tables.sort() self.__write("Database: %s" % db) @@ -189,6 +192,9 @@ class Dump: self.__write("+%s+" % lines) for table in tables: + if isinstance(table, (list, tuple, set)): + table = table[0] + blank = " " * (maxlength - len(table)) self.__write("| %s%s |" % (table, blank))