Skip to content

Commit 405f923

Browse files
committed
Remove duplicateed dupe check
This is done at parsing already Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 35a63a3 commit 405f923

File tree

1 file changed

+2
-20
lines changed

1 file changed

+2
-20
lines changed

src/attributecode/cmd.py

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -183,27 +183,9 @@ def inventory(location, output, format, quiet, verbose): # NOQA
183183
if location.lower().endswith('.zip'):
184184
# accept zipped ABOUT files as input
185185
location = extract_zip(location)
186-
187186
errors, abouts = collect_inventory(location)
188-
189-
# Do not write the output if one of the ABOUT files has duplicated keys
190-
# TODO: why do this check here?? Also if this is the place, we should list what the errors are.
191-
dup_error_msg = u'Duplicated keys'
192-
halt_output = False
193-
for err in errors:
194-
if dup_error_msg in err.message:
195-
halt_output = True
196-
break
197-
198-
if not halt_output:
199-
write_errors = write_output(abouts=abouts, location=output, format=format)
200-
for err in write_errors:
201-
errors.append(err)
202-
else:
203-
if not quiet:
204-
msg = u'Duplicated keys are not supported.\nPlease correct and re-run.'
205-
click.echo(msg)
206-
187+
write_errors = write_output(abouts=abouts, location=output, format=format)
188+
errors.extend(write_errors)
207189
errors_count = report_errors(errors, quiet, verbose, log_file_loc=output + '-error.log')
208190
if not quiet:
209191
msg = 'Inventory collected in {output}.'.format(**locals())

0 commit comments

Comments
 (0)