Skip to content

Commit

Permalink
Update docstring for _slurp_stdin
Browse files Browse the repository at this point in the history
  • Loading branch information
erik committed May 15, 2019
1 parent cefd629 commit 4f3a904
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Changelog
=========

v1.4.0 (unreleased)
v1.3.1 (unreleased)
-------------------

New
Expand All @@ -10,7 +10,7 @@ New
Changes
~~~~~~~

- Bump versions for library dependencies.
- Upgrade ``pglast`` to version ``1.4``.

Fixes
~~~~~
Expand Down
6 changes: 4 additions & 2 deletions squabble/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,11 +131,13 @@ def _slurp_file(file_name):


def _slurp_stdin():
"""Read entirety of stdin, silently exiting when sent an interrupt."""
"""
Read entirety of stdin and return as string, or ``None`` if a ``^c``
interrupt is triggered.
"""
try:
return sys.stdin.read()
except KeyboardInterrupt:
print('aborted')
return None


Expand Down

0 comments on commit 4f3a904

Please sign in to comment.