import hashlib


def file_stats(path):
    """Look at a path and return the lines, bytes, and sha-1"""
    try:
        with open(path,"rb") as f:
            data = f.read()
            hasher = hashlib.sha1()
            hasher.update(data)
            return (data.count(b"\n"), len(data), hasher.hexdigest())
    except TypeError as e:
        return None, None, None