def _get_id(owner, date, content):
    """
    Generate an unique Atom id for the given content
    """
    h = hashlib.sha256()
    # Hash still contains the original project url, keep as is
    h.update("github.com/spacetelescope/asv".encode('utf-8'))
    for x in content:
        if x is None:
            h.update(",".encode('utf-8'))
        else:
            h.update(x.encode('utf-8'))
        h.update(",".encode('utf-8'))

    if date is None:
        date = datetime.datetime(1970, 1, 1)
    return "tag:{0},{1}:/{2}".format(owner, date.strftime('%Y-%m-%d'), h.hexdigest())
def _get_id ( owner , date , content ) : h = hashlib . sha256 ( ) h . update ( "github.com/spacetelescope/asv" . encode ( 'utf-8' ) ) for x in content : if x is None : h . update ( "," . encode ( 'utf-8' ) ) else : h . update ( x . encode ( 'utf-8' ) ) h . update ( "," . encode ( 'utf-8' ) ) if date is None : date = datetime . datetime ( 1970 , 1 , 1 ) return "tag:{0},{1}:/{2}" . format ( owner , date . strftime ( '%Y-%m-%d' ) , h . hexdigest ( ) )
Generate an unique Atom id for the given content