Skip to content

Commit

Permalink
Merge pull request #618 from MichaelGrupp/catch-keyboard-interrupt
Browse files Browse the repository at this point in the history
Catch KeyboardInterrupt when reading from stdin.
  • Loading branch information
bwendling committed Oct 8, 2018
2 parents 39e0290 + 3349fd5 commit 32afb30
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions yapf/__init__.py
Expand Up @@ -174,6 +174,8 @@ def main(argv):
original_source.append(py3compat.raw_input())
except EOFError:
break
except KeyboardInterrupt:
return 1

if style_config is None and not args.no_local_style:
style_config = file_resources.GetDefaultStyleForDir(os.getcwd())
Expand Down

0 comments on commit 32afb30

Please sign in to comment.