1
0
mirror of https://github.com/kellyjonbrazil/jc.git synced 2025-06-17 00:07:37 +02:00

fix brek on pipe error

This commit is contained in:
Kelly Brazil
2020-04-09 13:38:33 -07:00
parent 7f869b4b18
commit 99f7842dee
3 changed files with 11 additions and 2 deletions

View File

@ -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

View File

@ -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()

View File

@ -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.',