diff --git a/lib/core/dump.py b/lib/core/dump.py index 4f9bd2058..c61d6ac2a 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -172,7 +172,7 @@ class Dump: for db, tables in dbTables.items(): tables.sort() - self.__write("Database: %s" % db) + self.__write("Database: %s" % db if db else "Current database") if len(tables) == 1: self.__write("[1 table]") @@ -220,7 +220,7 @@ class Dump: maxlength2 = max(maxlength2, len("TYPE")) lines2 = "-" * (maxlength2 + 2) - self.__write("Database: %s\nTable: %s" % (db, table)) + self.__write("Database: %s\nTable: %s" % (db if db else "Current database", table)) if len(columns) == 1: self.__write("[1 column]") @@ -270,7 +270,7 @@ class Dump: maxlength1 = max(maxlength1, len(normalizeUnicode(table) or str(table))) for db, counts in dbTables.items(): - self.__write("Database: %s" % db) + self.__write("Database: %s" % db if db else "Current database") lines1 = "-" * (maxlength1 + 2) blank1 = " " * (maxlength1 - len("Table")) @@ -339,7 +339,7 @@ class Dump: separator += "+%s" % lines separator += "+" - self.__write("Database: %s\nTable: %s" % (db, table)) + self.__write("Database: %s\nTable: %s" % (db if db else "Current database", table)) if conf.replicate: cols = []