Skip to content

Commit

Permalink
check for no results.
Browse files Browse the repository at this point in the history
  • Loading branch information
mwhooker committed Oct 19, 2013
1 parent 2d5798f commit 55f760e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion jsonselect/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
__title__ = 'jsonselect'
__version__ = '0.2.1'
__version__ = '0.2.2'
__author__ = 'Matthew Hooker'
__license__ = 'ISC'
__copyright__ = 'Copyright 2011 Matthew Hooker'
Expand Down
2 changes: 2 additions & 0 deletions jsonselect/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ def cli():

obj = json.load(fin)
selection = select(args.selector, obj)
if not selection:
sys.exit(2)
if args.machine_readable:
print json.dumps(selection)
elif args.list:
Expand Down

0 comments on commit 55f760e

Please sign in to comment.