Skip to content

Commit 8f546c8

Browse files
committed
Minor bug fix
1 parent 7ade9bc commit 8f546c8

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

about_code_tool/genabout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ def pre_generation(self, gen_location, input_list, action_num, all_in_one):
446446
def gen_license_list(line):
447447
dje_license_name = line['dje_license_name']
448448
file_location = line['about_file']
449-
if file_location.endswith('/'):
450-
file_location = file_location.rpartition('/')[0]
449+
"""if file_location.endswith('/'):
450+
file_location = file_location.rpartition('/')[0]"""
451451
about_parent_dir = dirname(file_location)
452452
return (about_parent_dir, dje_license_name)
453453

about_code_tool/tests/test_genabout.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ def test_gen_license_list_license_text_file_no_value(self):
462462
'version': '1', 'dje_license': 'apache-2.0',
463463
'dje_license_name': 'Apache License 2.0',
464464
'license_text_file': '', 'about_resource': 'opensans'}
465-
expected_list = ('/tmp/3pp', 'Apache License 2.0')
465+
expected_list = ('/tmp/3pp/opensans', 'Apache License 2.0')
466466
output = gen.gen_license_list(input_list)
467467
self.assertTrue(expected_list == output)
468468

@@ -472,7 +472,7 @@ def test_gen_license_list_no_license_text_file_key(self):
472472
'version': '1', 'dje_license': 'apache-2.0',
473473
'dje_license_name': 'Apache License 2.0',
474474
'about_resource': 'opensans'}
475-
expected_list = ('/tmp/3pp', 'Apache License 2.0')
475+
expected_list = ('/tmp/3pp/opensans', 'Apache License 2.0')
476476
output = gen.gen_license_list(input_list)
477477
self.assertTrue(expected_list == output)
478478

0 commit comments

Comments
 (0)