Skip to content

Commit d3ad120

Browse files
committed
Add errno for exit code
Signed-off-by: Chin Yeung Li <[email protected]>
1 parent ed4aa73 commit d3ad120

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/attributecode/cmd.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
from __future__ import print_function
1919
from __future__ import unicode_literals
2020

21+
import errno
2122
import logging
2223
import os
2324
from os.path import exists, join
@@ -212,8 +213,7 @@ def gen(location, output, mapping, license_notice_text_location, fetch_license,
212213

213214
if not location.endswith('.csv') and not location.endswith('.json'):
214215
click.echo('ERROR: Invalid input file format: must be .csv or .json.')
215-
# FIXME: return error code?
216-
return
216+
sys.exit(errno.EIO)
217217

218218
click.echo('Generating .ABOUT files...')
219219

0 commit comments

Comments
 (0)