def auth_error(self,stanza):
self.lock.acquire()<EOL>try:<EOL><INDENT>err=stanza.get_error()<EOL>ae=err.xpath_eval("<STR_LIT>",{"<STR_LIT:e>":"<STR_LIT>"})<EOL>if ae:<EOL><INDENT>ae=ae[<NUM_LIT:0>].name<EOL><DEDENT>else:<EOL><INDENT>ae=err.get_condition().name<EOL><DEDENT>raise LegacyAuthenticationError("<STR_LIT>"<EOL>% (ae,))<EOL><DEDENT>finally:<EOL><INDENT>self.lock.release()<EOL><DEDENT>
Handle legacy authentication error.

        [client only]