@@ -1220,12 +1220,10 @@ def generate_attribution(self,
12201220 try :
12211221 template = jinja_env .get_template (template_file_name )
12221222 except j2 .TemplateNotFound :
1223- print ('Template: %(template_file_name)s not found' % locals ())
12241223 return
12251224
12261225 limit_to = limit_to or []
12271226 limit_to = set (limit_to )
1228- print ('limit_to:' , limit_to )
12291227
12301228 about_object_fields = []
12311229 about_content_dict = {}
@@ -1237,52 +1235,43 @@ def generate_attribution(self,
12371235 file_name = about_object .location .partition (self .location )[2 ]
12381236 # FIXME: a path starting with / is NOT relative
12391237 about_relative_path = '/' + file_name
1240- print ('file_name:' , file_name )
12411238
12421239 if limit_to and about_relative_path in limit_to :
12431240 continue
12441241
12451242 about_content = about_object .validated_fields
1246- print ('about_content 1:' , about_content )
12471243 # Add information in the dictionary if not in the ABOUT file
12481244 lic_text = unicode (about_object .license_text (),
12491245 errors = 'replace' )
1250-
1251- print ('lic_text:' , lic_text )
1246+
12521247 about_content ['license_text' ] = lic_text
12531248 notice_text = about_object .notice_text ()
12541249 about_content ['notice_text' ] = notice_text
1255- print ('about_content 2:' , about_content )
12561250
1257- # FIXME: The following is a tmp code to handle multiple
1258- # ' license_text_file' in the input
1251+ # FIXME: The following is temporary code to handle multiple
1252+ # license_text_file paths in the field value, one per lne
12591253 for k in about_content :
12601254 if ('\n ' in about_content [k ]
12611255 and k == 'license_text_file' ):
1256+ # FIXME: we should report decoding errors
12621257 lic_text = unicode (about_object .tmp_get_license_text (),
12631258 errors = 'replace' )
12641259 about_content ['license_text' ] = lic_text
1265- print ('about_content 3:' , about_content )
12661260
1267- # Raise error if no license_text is found
1261+ # report error if no license_text is found
12681262 if not about_content .get ('license_text' ):
12691263 msg = ('No license_text found. '
12701264 'Skipping License generation.' )
1271- print ()
1272- print (msg )
1273- print ()
12741265 err = Error (GENATTRIB , 'name' ,
12751266 about_object .get_about_name (), msg )
12761267 self .genattrib_errors .append (err )
12771268
12781269 about_object_fields .append (about_content )
1279- print ('about_object_fields:' , about_object_fields )
12801270
12811271 # find paths requested in the limit_to paths arg that do not point to
12821272 # a corresponding ABOUT file
12831273 for path in limit_to :
12841274 path = posix_path (path )
1285-
12861275 afp = join (self .location , path )
12871276 msg = ('The requested ABOUT file: %(afp)r does not exist. '
12881277 'No attribution generated for this file.' % locals ())
@@ -1296,9 +1285,6 @@ def generate_attribution(self,
12961285 license_text_list.append(common_license_dict[key])"""
12971286
12981287 rendered = template .render (about_objects = about_object_fields )
1299- print ('genattrib_errors:' , self .genattrib_errors )
1300- print ('rendered:' , rendered )
1301- print ()
13021288 return rendered
13031289
13041290 def check_paths (self , paths ):
0 commit comments