def check_resource_update(rsrc, template_id, resource_data, engine_id, stack, msg_queue):
 check_message = functools.partial(_check_for_message, msg_queue)
 if (rsrc.action == resource.Resource.INIT):
  rsrc.create_convergence(template_id, resource_data, engine_id, stack.time_remaining(), check_message)
 else:
  rsrc.update_convergence(template_id, resource_data, engine_id, stack.time_remaining(), stack, check_message)

def check_resource_update ( rsrc , template_id , resource_data , engine_id , stack , msg_queue ) : check_message = functools . partial ( _check_for_message , msg_queue ) if ( rsrc . action == resource . Resource . INIT ) : rsrc . create_convergence ( template_id , resource_data , engine_id , stack . time_remaining ( ) , check_message ) else : rsrc . update_convergence ( template_id , resource_data , engine_id , stack . time_remaining ( ) , stack , check_message )
create or update the resource if appropriate .