Fix json loading in sensu_check

Fixes `AttributeError: 'str' object has no attribute 'read'` when the
check path exists
pull/18777/head
Darren Worrall 9 years ago committed by Matt Clay
parent b40a8af999
commit 0a2a10e395

@ -186,7 +186,7 @@ def sensu_check(module, path, name, state='present', backup=False):
try:
try:
stream = open(path, 'r')
config = json.load(stream.read())
config = json.load(stream)
except IOError, e:
if e.errno is 2: # File not found, non-fatal
if state == 'absent':

Loading…
Cancel
Save