#NEWLINE# def _decode_subelements( self ) : #NEWLINE# #INDENT# 'Decode the stanza subelements.' #NEWLINE# for child in self . _element : #NEWLINE# #INDENT# if ( child . tag == self . _show_tag ) : #NEWLINE# #INDENT# self . _show = child . text #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( child . tag == self . _status_tag ) : #NEWLINE# #INDENT# self . _status = child . text #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( child . tag == self . _priority_tag ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . _priority = int ( child . text . strip ( ) ) #NEWLINE# if ( ( self . _priority < ( - 128 ) ) or ( self . _priority > 127 ) ) : #NEWLINE# #INDENT# raise ValueError #NEWLINE# #UNINDENT# #UNINDENT# except ValueError : #NEWLINE# #INDENT# raise BadRequestProtocolError ( 'Presence priority not an integer' )