"""Entry point module: post-process-chunk

Implements the entry-point by using Python or any other languages.
"""

import os


def entry_point(chunk_id, system_cache_dir):
    """Method to complete: you have to raise an exception if an error occured
    in the program.

    Post-process a chunk.

    Args:
        chunk_id (str): Chunk id
        system_cache_dir (str): Path to system cache directory

    """
    temp_file = os.path.join(system_cache_dir, '%s_temp2.txt' % (chunk_id))
    f = open(temp_file, 'r')
    files = f.readlines()
    f.close()
    files = [f.strip() for f in files]
    for f in files:
        command = "rm %s" % (f)
        os.system(command)
