#NEWLINE# def change( self ) : #NEWLINE# #INDENT# "log if changed\n           logs once and then only if changed\n           requires that self.prepare has been called otherwise fields in\n           self.lasts won't match fields in log\n        " #NEWLINE# if ( self . stamp is None ) : #NEWLINE# #INDENT# self . log ( ) #NEWLINE# return #NEWLINE# #UNINDENT# change = False #NEWLINE# for ( tag , loggee ) in self . loggees . items ( ) : #NEWLINE# #INDENT# last = loggee . lasts [ tag ] #NEWLINE# for ( field , value ) in loggee . items ( ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( getattr ( last , field ) != value ) : #NEWLINE# #INDENT# change = True #NEWLINE# setattr ( last , field , value ) #NEWLINE# #UNINDENT# #UNINDENT# except AttributeError as ex : #NEWLINE# #INDENT# console . terse ( "Warning: Log {0}, new runtime field '{1}' for loggee {2}\n" . format ( self . name , field , loggee . name ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# if change : #NEWLINE# #INDENT# self . log ( )