#NEWLINE# def salmon_send( handler , user , salmon_url , text ) : #NEWLINE# #INDENT# salmonizer = salmoning . SalmonProtocol ( ) #NEWLINE# salmonizer . key_retriever = MockKeyRetriever ( local_user = text ) #NEWLINE# env = salmonizer . SignSalmon ( unicode ( text , 'utf8' ) , 'application/atom+xml' , handler . nav_url ( host = True , username = user . username ) ) #NEWLINE# try : #NEWLINE# #INDENT# req = urllib2 . Request ( url = salmon_url , data = env , headers = { #NEWLINE# #INDENT# 'Content-Type' : 'application/magic-envelope+xml' , #NEWLINE# #UNINDENT# } ) #NEWLINE# urllib2 . urlopen ( req ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# pass