(self, info)
return result
Get a digest from a dictionary by looking at keys of the form
        'algo_digest'.

        Returns a 2-tuple (algo, digest) if found, else None. Currently
        looks only for SHA256, then MD5.
Get a digest from a dictionary by looking at keys of the form
        'algo_digest'.
Get a digest from a dictionary by looking at keys of the form algo_digest .
def _get_digest(self, info):
        """
        Get a digest from a dictionary by looking at keys of the form
        'algo_digest'.

        Returns a 2-tuple (algo, digest) if found, else None. Currently
        looks only for SHA256, then MD5.
        """
        result = None
        for algo in ('sha256', 'md5'):
            key = '%s_digest' % algo
            if key in info:
                result = (algo, info[key])
                break
        return result
def _get_digest ( self , info ) : result = None for algo in ( 'sha256' , 'md5' ) : key = '%s_digest' % algo if key in info : result = ( algo , info [ key ] ) break return result