Skip to content

Commit 9de0718

Browse files
committed
#542 - better error message for newline character detected in 'about_resource'
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent 55abd3f commit 9de0718

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/attributecode/gen.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,12 @@ def check_newline_in_file_field(component):
9393
if k in file_fields:
9494
try:
9595
if '\n' in component[k]:
96-
msg = ("New line character detected in '%s' for '%s' which is not supported."
97-
"\nPlease use ',' to declare multiple files.") % (k, component['about_resource'])
96+
if k == u'about_resource':
97+
msg = (
98+
"New line character detected in 'about_resource' for '%s' which is not supported.") % component['about_resource']
99+
else:
100+
msg = ("New line character detected in '%s' for '%s' which is not supported."
101+
"\nPlease use ',' to declare multiple files.") % (k, component['about_resource'])
98102
errors.append(Error(CRITICAL, msg))
99103
except:
100104
pass

0 commit comments

Comments
 (0)