#NEWLINE# def auth_error( self , stanza ) : #NEWLINE# #INDENT# 'Handle legacy authentication error.\n\n        [client only]' #NEWLINE# self . lock . acquire ( ) #NEWLINE# try : #NEWLINE# #INDENT# err = stanza . get_error ( ) #NEWLINE# ae = err . xpath_eval ( 'e:*' , { #NEWLINE# #INDENT# 'e' : 'jabber:iq:auth:error' , #NEWLINE# #UNINDENT# } ) #NEWLINE# if stanza : #NEWLINE# #INDENT# ae = ae [ 0 ] . name #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# ae = err . get_condition ( ) . name #NEWLINE# #UNINDENT# raise LegacyAuthenticationError ( ( 'Authentication error condition: %s' % ( ae , ) ) ) #NEWLINE# #UNINDENT# finally : #NEWLINE# #INDENT# self . lock . release ( )