def db_repair(name, table=None, **connection_args):
 ret = []
 if (table is None):
  tables = db_tables(name, **connection_args)
  for table in tables:
   log.info("Repairing table '{0}' in db '{1}'..".format(name, table))
   ret.append(__repair_table(name, table, **connection_args))
 else:
  log.info("Repairing table '{0}' in db '{1}'..".format(name, table))
  ret = __repair_table(name, table, **connection_args)
 return ret

def db_repair ( name , table = None , ** connection_args ) : ret = [ ] if ( table is None ) : tables = db_tables ( name , ** connection_args ) for table in tables : log . info ( "Repairing table '{0}' in db '{1}'.." . format ( name , table ) ) ret . append ( __repair_table ( name , table , ** connection_args ) ) else : log . info ( "Repairing table '{0}' in db '{1}'.." . format ( name , table ) ) ret = __repair_table ( name , table , ** connection_args ) return ret
repairs the full database or just a given table cli example: .