#NEWLINE# def to_dict( self ) : #NEWLINE# #INDENT# 'Return a dictionary representation of the exception.' #NEWLINE# as_dict = dict ( ( self . payload or ( ) ) ) #NEWLINE# as_dict [ 'message' ] = self . message #NEWLINE# return as_dict