#NEWLINE# def populate( self , m ) : #NEWLINE# #INDENT# status = status [ ':status' ] #NEWLINE# if ( status == 'success' ) : #NEWLINE# #INDENT# self . error = False #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( status == 'error' ) : #NEWLINE# #INDENT# self . error = True #NEWLINE# self . code = m [ ':error-code' ] #NEWLINE# self . details = m [ ':details' ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( ( 'unexpected status: ' + str ( status ) ) )