@@ -959,7 +959,6 @@ def get_dje_license_name(self):
959959 return self .parsed ['dje_license_name' ]
960960 except Exception as e :
961961 pass
962-
963962 return ""
964963
965964 def get_license_text_file_name (self ):
@@ -970,7 +969,16 @@ def get_license_text_file_name(self):
970969 return self .parsed ['license_text_file' ]
971970 except Exception as e :
972971 pass
972+ return ""
973973
974+ def get_about_name (self ):
975+ """
976+ Return the about object's name
977+ """
978+ try :
979+ return self .parsed ['name' ]
980+ except Exception as e :
981+ pass
974982 return ""
975983
976984class AboutCollector (object ):
@@ -1144,9 +1152,9 @@ def generate_attribution(self, template_path=None, limit_to=None):
11441152 if about_object .license_text ():
11451153 license_dict [about_object .get_dje_license_name ()] = unicode (about_object .license_text (), errors = 'replace' )
11461154 else :
1147- msg = 'About resource : %s - license_text does not exist.' \
1155+ msg = 'Name : %s - license_text does not exist.' \
11481156 ' License generation is skipped.' \
1149- % about_object .about_resource
1157+ % about_object .get_about_name ()
11501158 self .genattrib_errors .append (Error (GENATTRIB ,\
11511159 'dje_license' ,\
11521160 dje_license_name , msg ))
@@ -1155,16 +1163,16 @@ def generate_attribution(self, template_path=None, limit_to=None):
11551163 if about_object .license_text ():
11561164 license_dict [about_object .get_license_text_file_name ()] = unicode (about_object .license_text (), errors = 'replace' )
11571165 else :
1158- msg = 'About resource : %s - license_text does not exist.' \
1166+ msg = 'Name : %s - license_text does not exist.' \
11591167 ' License generation is skipped.' \
1160- % about_object .about_resource
1168+ % about_object .get_about_name ()
11611169 self .genattrib_errors .append (Error (GENATTRIB ,\
11621170 'license_text' ,\
11631171 about_object .get_license_text_file_name (), msg ))
11641172 else :
11651173 msg = 'No dje_license or license_text is found. License generation is skipped.'
1166- self .genattrib_errors .append (Error (GENATTRIB , 'about_resource ' ,\
1167- about_object .about_resource ,\
1174+ self .genattrib_errors .append (Error (GENATTRIB , 'name ' ,\
1175+ about_object .get_about_name () ,\
11681176 msg ))
11691177
11701178 if not_exist_components :
0 commit comments