(conn, table_name_wildcard, separator)
return matching_tables
Find tables to backup
Find tables to backup
Find tables to backup
def get_table_name_matches(conn, table_name_wildcard, separator):
    """
    Find tables to backup
    """

    all_tables = []
    last_evaluated_table_name = None

    while True:
        optional_args = {}
        if last_evaluated_table_name is not None:
            optional_args["ExclusiveStartTableName"] = last_evaluated_table_name
        table_list = conn.list_tables(**optional_args)
        all_tables.extend(table_list["TableNames"])

        try:
            last_evaluated_table_name = table_list["LastEvaluatedTableName"]
        except KeyError:
            break

    matching_tables = []
    for table_name in all_tables:
        if fnmatch.fnmatch(table_name, table_name_wildcard):
            logging.info("Adding %s", table_name)
            matching_tables.append(table_name)

    return matching_tables
def get_table_name_matches ( conn , table_name_wildcard , separator ) : all_tables = [ ] last_evaluated_table_name = None while True : optional_args = { } if last_evaluated_table_name is not None : optional_args [ "ExclusiveStartTableName" ] = last_evaluated_table_name table_list = conn . list_tables ( * * optional_args ) all_tables . extend ( table_list [ "TableNames" ] ) try : last_evaluated_table_name = table_list [ "LastEvaluatedTableName" ] except KeyError : break matching_tables = [ ] for table_name in all_tables : if fnmatch . fnmatch ( table_name , table_name_wildcard ) : logging . info ( "Adding %s" , table_name ) matching_tables . append ( table_name ) return matching_tables