Skip to content

Commit

Permalink
Minor bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chinyeungli committed Aug 1, 2014
1 parent db9bd21 commit d2cabed
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions about_code_tool/genabout.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,8 @@ def verify_files_existance(self, input_list, project_dir, file_in_project):
else:
file_value.append(line[file_key])
for value in file_value:
about_parent_dir = normpath(dirname(join(file_location, value)))
if file_location.endswith('/'):
about_parent_dir = normpath(dirname(join(file_location, value)))
file_path_list.append(join(project_dir, dirname(file_location), value))
else:
if '\n' in line[file_key]:
Expand Down Expand Up @@ -343,7 +344,6 @@ def get_dje_license_list(self, gen_location, input_list, gen_license, dje_licens
file_value = [line['license_text_file']]
for license_text_file in file_value:
license_file_list.append(normpath(gen_location.rpartition('/')[0] + join(about_parent_dir, license_text_file)))
print(license_file_list)
for license_file in license_file_list:
if not _exists(license_file):
self.errors.append(Error('license_text_file', license_file, "The 'license_text_file' does not exist."))
Expand Down
2 changes: 1 addition & 1 deletion about_code_tool/tests/test_genabout.py
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ def test_verify_files_existance_exist_license_in_project(self):
'license_text_file': 'apache2.LICENSE',
'name': 'ABOUT tool', 'about_resource': '.'}]
path = '.'
expected_list = [(join('.', 'apache2.LICENSE'), '.')]
expected_list = [(join('.', 'apache2.LICENSE'), '')]
output = gen.verify_files_existance(input_list, path, True)
self.assertEqual(expected_list, output)
self.assertFalse(gen.warnings, "No warnings should be returned.")
Expand Down

0 comments on commit d2cabed

Please sign in to comment.