Skip to content

Commit 6a9e329

Browse files
committed
Correct duplicated file not exist error #286
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 768da9b commit 6a9e329

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

src/attributecode/model.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -399,9 +399,13 @@ def _validate(self, *args, **kwargs):
399399
if not os.path.exists(location):
400400
# We don't want to show the UNC_PREFIX in the error message
401401
location = util.to_posix(location.strip(UNC_PREFIX))
402-
msg = (u'Field %(name)s: Path %(location)s not found'
403-
% locals())
404-
errors.append(Error(CRITICAL, msg))
402+
# FIXME: This is a temp fix for #286
403+
# The field in ignore_checking_list is validated in the check_file_field_exist function
404+
ignore_checking_list = [u'license_file', u'notice_file', u'changelog_file']
405+
if not name in ignore_checking_list:
406+
msg = (u'Field %(name)s: Path %(location)s not found'
407+
% locals())
408+
errors.append(Error(CRITICAL, msg))
405409
location = None
406410
else:
407411
msg = (u'Field %(name)s: Unable to verify path: %(path)s:'

0 commit comments

Comments
 (0)