#NEWLINE# def _add_tags( self , resources ) : #NEWLINE# #INDENT# context = self . _config . context #NEWLINE# context . ami . tags . creation_time = '{0:%F %T UTC}' . format ( datetime . utcnow ( ) ) #NEWLINE# for resource in resources : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . _cloud . add_tags ( resource ) #NEWLINE# #UNINDENT# except FinalizerException : #NEWLINE# #INDENT# errstr = 'Error adding tags to {0}' . format ( resource ) #NEWLINE# log . error ( errstr ) #NEWLINE# log . debug ( resource , exc_info = True ) #NEWLINE# return False #NEWLINE# #UNINDENT# log . info ( 'Successfully tagged {0}' . format ( resource ) ) #NEWLINE# #UNINDENT# log . info ( 'Successfully tagged objects' ) #NEWLINE# return True