Merge pull request #983 from DazWorrall/bug/sensu_check_missing_file

Fix errors in sensu_check
reviewable/pr18780/r1
James Cammarata 11 years ago
commit 984b7bd09d

@ -182,10 +182,11 @@ def sensu_check(module, path, name, state='present', backup=False):
except ImportError:
import simplejson as json
stream = None
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