Skip to content

Commit d8bb9d2

Browse files
committed
Improve the error message
1 parent 1e6875f commit d8bb9d2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

about_code_tool/about.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1280,7 +1280,6 @@ def generate_attribution(self, template_path=None, limit_to=None):
12801280
# the about_file's location with the input list.
12811281
about_relative_path = about_object.location.partition(
12821282
normpath(self.location))[2]
1283-
12841283
if component == about_relative_path:
12851284
component_exist = True
12861285
about_content = about_object.validated_fields
@@ -1312,9 +1311,10 @@ def generate_attribution(self, template_path=None, limit_to=None):
13121311
about_object_fields.append(about_content)
13131312
break
13141313
if not component_exist:
1314+
loc = self.location + component
13151315
msg = ('The requested ABOUT file: %r does not exist. '
1316-
'No attribution generated for this file.' % component)
1317-
err = Error(GENATTRIB, 'about_file', component, msg)
1316+
'No attribution generated for this file.' % loc)
1317+
err = Error(GENATTRIB, 'about_file', loc, msg)
13181318
self.genattrib_errors.append(err)
13191319
else:
13201320
for about_object in self:

0 commit comments

Comments
 (0)