Skip to content

Commit

Permalink
Return non-zero exit status for missing files
Browse files Browse the repository at this point in the history
  • Loading branch information
myint committed Oct 12, 2017
1 parent 459f5f5 commit a46eb64
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion autoflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
import pyflakes.reporter


__version__ = '0.7'
__version__ = '1.0a0'


ATOMS = frozenset([tokenize.NAME, tokenize.NUMBER, tokenize.STRING])
Expand Down Expand Up @@ -717,11 +717,15 @@ def _main(argv, standard_out, standard_error):
args.exclude = set([])

filenames = list(set(args.files))
failure = False
for name in find_files(filenames, args.recursive, args.exclude):
try:
fix_file(name, args=args, standard_out=standard_out)
except IOError as exception:
print(unicode(exception), file=standard_error)
failure = True

return 1 if failure else 0


def main():
Expand Down

0 comments on commit a46eb64

Please sign in to comment.