def get_slugignores(root, fname='.slugignore'):
    """
    Given a root path, read any .slugignore file inside and return a list of
    patterns that should be removed prior to slug compilation.

    Return empty list if file does not exist.
    """
    try:
        with open(os.path.join(root, fname)) as f:
            return [l.rstrip('\n') for l in f]
    except IOError:
        return []
Given a root path, read any .slugignore file inside and return a list of
    patterns that should be removed prior to slug compilation.

    Return empty list if file does not exist.