sbsv2/raptor/python/plugins/filter_terminal.py
branchfix
changeset 46 14d284e75719
parent 45 0e5978b000d1
child 47 b0785ef0e8cd
equal deleted inserted replaced
45:0e5978b000d1 46:14d284e75719
   103 
   103 
   104 class FilterTerminal(filter_interface.Filter):
   104 class FilterTerminal(filter_interface.Filter):
   105 
   105 
   106 	attribute_re = re.compile("([a-z][a-z0-9]*)='([^']*)'",re.I)
   106 	attribute_re = re.compile("([a-z][a-z0-9]*)='([^']*)'",re.I)
   107 	maxdots = 40 # if one prints dots then don't print masses
   107 	maxdots = 40 # if one prints dots then don't print masses
   108 	recipelinelimit = 100 # don't scan ultra-long recipes in case we run out of memory
   108 	recipelinelimit = 1024 # don't scan ultra-long recipes in case we run out of memory
   109 
   109 
   110 	# recipes that we think most users are interested in
   110 	# recipes that we think most users are interested in
   111 	# and the mapping that we will use to output them as
   111 	# and the mapping that we will use to output them as
   112 	docare = {
   112 	docare = {
   113 		"asmcompile" : "asmcompile" ,
   113 		"asmcompile" : "asmcompile" ,
   335 			if self.inRecipe:
   335 			if self.inRecipe:
   336 				self.inBody = True
   336 				self.inBody = True
   337 		elif text.startswith("]]>"):
   337 		elif text.startswith("]]>"):
   338 			if self.inRecipe:
   338 			if self.inRecipe:
   339 				self.inBody = False
   339 				self.inBody = False
   340 				if self.recipelineExceeded:
   340 				if self.recipelineExceeded > 0:
   341 					self.recipeBody.append("[filter_terminal: OUTPUT TRUNCATED: Recipe output limit exceeded; " + \
   341 					self.recipeBody.append("[filter_terminal: OUTPUT TRUNCATED: " + \
   342 						"see logfile for full output (%s lines shown out of %s)]" % \
   342 						"Recipe output limit exceeded; see logfile for full output " + \
   343 						(FilterTerminal.recipelinelimit, FilterTerminal.recipelinelimit + self.recipelineExceeded))
   343 						"(%s lines shown out of %s)]" % (FilterTerminal.recipelinelimit, \
       
   344 						FilterTerminal.recipelinelimit + self.recipelineExceeded))
   344 		elif text.startswith("<info>Copied"):
   345 		elif text.startswith("<info>Copied"):
   345 			if not self.analyseonly and not self.quiet:
   346 			if not self.analyseonly and not self.quiet:
   346 				start = text.find(" to ") + 4
   347 				start = text.find(" to ") + 4
   347 				end = text.find("</info>",start)
   348 				end = text.find("</info>",start)
   348 				short_target = text[start:end]
   349 				short_target = text[start:end]