def thin_sum(cachedir, form='sha1'):
    '''
    Return the checksum of the current thin tarball
    '''
    thintar = gen_thin(cachedir)
    code_checksum_path = os.path.join(cachedir, 'thin', 'code-checksum')
    if os.path.isfile(code_checksum_path):
        with salt.utils.files.fopen(code_checksum_path, 'r') as fh:
            code_checksum = "'{0}'".format(fh.read().strip())
    else:
        code_checksum = "'0'"

    return code_checksum, salt.utils.hashutils.get_hash(thintar, form)
def thin_sum ( cachedir , form = 'sha1' ) : thintar = gen_thin ( cachedir ) code_checksum_path = os . path . join ( cachedir , 'thin' , 'code-checksum' ) if os . path . isfile ( code_checksum_path ) : with salt . utils . files . fopen ( code_checksum_path , 'r' ) as fh : code_checksum = "'{0}'" . format ( fh . read ( ) . strip ( ) ) else : code_checksum = "'0'" return code_checksum , salt . utils . hashutils . get_hash ( thintar , form )
Return the checksum of the current thin tarball