def droptable(): """Drop database table by --talbe_name""" table_name = flags.OPTIONS.table_name if table_name and table_name in TABLE_MAPPING: database.drop_table(TABLE_MAPPING[table_name]) else: print '--table_name should be in %s' % TABLE_MAPPING.keys()
def droptable(): """Drop database table.""" if not flags.OPTIONS.table_name: print 'flag --table_name is missing' return table_name = flags.OPTIONS.table_name if table_name not in TABLE_MAPPING: print '--table_name should be in %s' % TABLE_MAPPING.keys() return database.drop_table(TABLE_MAPPING[table_name])