cfb0157aeb4b9858b42baa0cb6a2aac6536ea55e chmalee Tue Nov 6 07:25:29 2018 -0800 Forgot else statement if tables are formatted correctly, refs #22364 diff --git src/utils/qa/qaGbTracks src/utils/qa/qaGbTracks index 537ce5c..0a2f097 100755 --- src/utils/qa/qaGbTracks +++ src/utils/qa/qaGbTracks @@ -37,30 +37,32 @@ parser.add_argument('outFile', help='base name to give results files') args = parser.parse_args() if args.tableFile: # add any additional tables in the table file to the table list args.table.extend((args.tableFile[0].read()).split()) args.tableFile[0].close() return args def cleanTableList(tableList): """Strips 'db.' from tables in tableList.""" ret = [] for tbl in tableList: if "." in tbl: ix = tbl.index(".") ret.append(tbl[ix+1:]) + else: + ret.append(tbl) return ret def checkTablesReceived(tableList, outFile): """Raises an exception if the tableList is empty. (Necessary because both ways of specifying tables are optional.)""" if not tableList: raise Exception("Received outFile name '" + outFile + "', but no tables were specified.") def tableExists(db, table): """True if the table exists in the given database.""" sqlResult = qaUtils.callHgsql(db, "show tables like '" + table + "'") return sqlResult.strip() == table def checkTablesExist(db, tableList): """Raises an exception if any table in the tables list does not exist in the database."""