@@ -1141,22 +1141,22 @@ def dumpColumn(self):
11411141 message = "do you want to dump entries? [Y/n] "
11421142 output = readInput (message , default = "Y" )
11431143
1144- if output not in ("y" , "Y" ):
1144+ if output and output [ 0 ] not in ("y" , "Y" ):
11451145 return
11461146
11471147 dumpFromDbs = []
1148- message = "which database?\n [a]ll (default)\n "
1148+ message = "which database(s) ?\n [a]ll (default)\n "
11491149
11501150 for db in dbs :
11511151 message += "[%s]\n " % db
11521152
11531153 message += "[q]uit"
11541154 test = readInput (message , default = "a" )
11551155
1156- if not test or test [ 0 ] in ("a" , "A" ):
1156+ if not test or test in ("a" , "A" ):
11571157 dumpFromDbs = dbs .keys ()
11581158
1159- elif test [ 0 ] in ("q" , "Q" ):
1159+ elif test in ("q" , "Q" ):
11601160 return
11611161
11621162 else :
@@ -1167,8 +1167,33 @@ def dumpColumn(self):
11671167 continue
11681168
11691169 conf .db = db
1170+ dumpFromTbls = []
1171+ message = "which table(s) of database '%s'?\n " % db
1172+ message += "[a]ll (default)\n "
1173+
1174+ for tbl in tblData :
1175+ message += "[%s]\n " % tbl
1176+
1177+ message += "[s]kip\n "
1178+ message += "[q]uit"
1179+ test = readInput (message , default = "a" )
1180+
1181+ if not test or test in ("a" , "A" ):
1182+ dumpFromTbls = tblData
1183+
1184+ elif test in ("s" , "S" ):
1185+ continue
1186+
1187+ elif test in ("q" , "Q" ):
1188+ return
1189+
1190+ else :
1191+ dumpFromTbls = test .replace (" " , "" ).split ("," )
11701192
11711193 for table , columns in tblData .items ():
1194+ if table not in dumpFromTbls :
1195+ continue
1196+
11721197 conf .tbl = table
11731198 conf .col = "," .join (column for column in columns )
11741199 kb .data .cachedColumns = {}
0 commit comments