def checksum_tarball(file):
    block_size = 65536
    hasher = hashlib.sha256()
    with open(file, 'rb') as tfile:
        buf = tfile.read(block_size)
        while (len(buf) > 0):
            hasher.update(buf)
            buf = tfile.read(block_size)
    return hasher.hexdigest()
def checksum_tarball(file):
    block_size = 65536
    hasher = hashlib.sha256()
    with open(file, 'rb') as tfile:
        buf = tfile.read(block_size)
        while (len(buf) > 0):
            hasher.update(buf)
            buf = tfile.read(block_size)
    return hasher.hexdigest()