diff --git a/jsonselect/__init__.py b/jsonselect/__init__.py index b450456..6918493 100644 --- a/jsonselect/__init__.py +++ b/jsonselect/__init__.py @@ -1,5 +1,5 @@ __title__ = 'jsonselect' -__version__ = '0.2.1' +__version__ = '0.2.2' __author__ = 'Matthew Hooker' __license__ = 'ISC' __copyright__ = 'Copyright 2011 Matthew Hooker' diff --git a/jsonselect/__main__.py b/jsonselect/__main__.py index 0b2ce9c..ca170c2 100644 --- a/jsonselect/__main__.py +++ b/jsonselect/__main__.py @@ -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: