Skip to content

Commit d2cabed

Browse files
committed
Minor bug fix
1 parent db9bd21 commit d2cabed

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

about_code_tool/genabout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,8 @@ def verify_files_existance(self, input_list, project_dir, file_in_project):
225225
else:
226226
file_value.append(line[file_key])
227227
for value in file_value:
228-
about_parent_dir = normpath(dirname(join(file_location, value)))
228+
if file_location.endswith('/'):
229+
about_parent_dir = normpath(dirname(join(file_location, value)))
229230
file_path_list.append(join(project_dir, dirname(file_location), value))
230231
else:
231232
if '\n' in line[file_key]:
@@ -343,7 +344,6 @@ def get_dje_license_list(self, gen_location, input_list, gen_license, dje_licens
343344
file_value = [line['license_text_file']]
344345
for license_text_file in file_value:
345346
license_file_list.append(normpath(gen_location.rpartition('/')[0] + join(about_parent_dir, license_text_file)))
346-
print(license_file_list)
347347
for license_file in license_file_list:
348348
if not _exists(license_file):
349349
self.errors.append(Error('license_text_file', license_file, "The 'license_text_file' does not exist."))

about_code_tool/tests/test_genabout.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ def test_verify_files_existance_exist_license_in_project(self):
419419
'license_text_file': 'apache2.LICENSE',
420420
'name': 'ABOUT tool', 'about_resource': '.'}]
421421
path = '.'
422-
expected_list = [(join('.', 'apache2.LICENSE'), '.')]
422+
expected_list = [(join('.', 'apache2.LICENSE'), '')]
423423
output = gen.verify_files_existance(input_list, path, True)
424424
self.assertEqual(expected_list, output)
425425
self.assertFalse(gen.warnings, "No warnings should be returned.")

0 commit comments

Comments
 (0)