hobos: read json from a file if a filename is given on the command line (#6486)
This commit is contained in:
parent
377911a431
commit
d0e2120ef5
|
@ -42,8 +42,11 @@ class CmdCheckHobos(Command):
|
|||
|
||||
global_app_dir = pub.app_dir
|
||||
|
||||
# get environment definition from stdin
|
||||
self.all_services = json.load(sys.stdin)
|
||||
if not args or args[0] == '-':
|
||||
# get environment definition from stdin
|
||||
self.all_services = json.load(sys.stdin)
|
||||
else:
|
||||
self.all_services = json.load(file(args[0]))
|
||||
|
||||
services = [x for x in self.all_services.get('services', []) if \
|
||||
x.get('service-id') == 'wcs']
|
||||
|
|
Loading…
Reference in New Issue