parameters: (project, name, generator, target_type, properties, sources)
docstring: Checks if generator invocation can be pruned, because it's guaranteed
          to fail. If so, quickly returns empty list. Otherwise, calls
          try_one_generator_really.
docstring_summary: Checks if generator invocation can be pruned, because it's guaranteed
          to fail. If so, quickly returns empty list. Otherwise, calls
          try_one_generator_really.
docstring_tokens: Checks if generator invocation can be pruned because it s guaranteed to fail . If so quickly returns empty list . Otherwise calls try_one_generator_really .
function: def try_one_generator (project, name, generator, target_type, properties, sources):
      """ Checks if generator invocation can be pruned, because it's guaranteed
          to fail. If so, quickly returns empty list. Otherwise, calls
          try_one_generator_really.
      """
      source_types = []
  
      for s in sources:
          source_types.append (s.type ())
  
      viable_source_types = viable_source_types_for_generator (generator)
      
      if source_types and viable_source_types != ['*'] and\
             not set.intersection (source_types, viable_source_types):
          if project.manager ().logger ().on ():
              id = generator.id ()            
              project.manager ().logger ().log (__name__, "generator '%s' pruned" % id)
              project.manager ().logger ().log (__name__, "source_types" '%s' % source_types)
              project.manager ().logger ().log (__name__, "viable_source_types '%s'" % viable_source_types)
          
          return []
  
      else:
          return try_one_generator_really (project, name, generator, target_type, properties, sources)
function_tokens: def try_one_generator ( project , name , generator , target_type , properties , sources ) : source_types = [ ] for s in sources : source_types . append ( s . type ( ) ) viable_source_types = viable_source_types_for_generator ( generator ) if source_types and viable_source_types != [ '*' ] and not set . intersection ( source_types , viable_source_types ) : if project . manager ( ) . logger ( ) . on ( ) : id = generator . id ( ) project . manager ( ) . logger ( ) . log ( __name__ , "generator '%s' pruned" % id ) project . manager ( ) . logger ( ) . log ( __name__ , "source_types" '%s' % source_types ) project . manager ( ) . logger ( ) . log ( __name__ , "viable_source_types '%s'" % viable_source_types ) return [ ] else : return try_one_generator_really ( project , name , generator , target_type , properties , sources )