diff --git a/changelog.txt b/changelog.txt index 632928cc..9f55b05d 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,5 +1,8 @@ jc changelog +20200409 v1.10.3 +- Fix break on pipe error + 20200409 v1.10.2 - Change colors to ansi and match jello colors diff --git a/jc/cli.py b/jc/cli.py index 6eb31925..a031aadf 100644 --- a/jc/cli.py +++ b/jc/cli.py @@ -18,7 +18,7 @@ import jc.utils class info(): - version = '1.10.2' + version = '1.10.3' description = 'jc cli output JSON conversion tool' author = 'Kelly Brazil' author_email = 'kellyjonbrazil@gmail.com' @@ -289,6 +289,12 @@ def main(): # break on ctrl-c keyboard interrupt signal.signal(signal.SIGINT, ctrlc) + # break on pipe error. need try/except for windows compatibility + try: + signal.signal(signal.SIGPIPE, signal.SIG_DFL) + except AttributeError: + pass + # try magic syntax first: e.g. jc -p ls -al magic() diff --git a/setup.py b/setup.py index 92de31c2..b63691f9 100755 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ with open('README.md', 'r') as f: setuptools.setup( name='jc', - version='1.10.2', + version='1.10.3', author='Kelly Brazil', author_email='kellyjonbrazil@gmail.com', description='This tool serializes the output of popular command line tools and filetypes to structured JSON output.',