Initialise `stream` variable

Fixes `UnboundLocalError: local variable 'stream' referenced before
assignment` when the check path doesnt exist
reviewable/pr18780/r1
Darren Worrall 9 years ago
parent ea1bd0b078
commit 4ead053031

@ -182,6 +182,7 @@ def sensu_check(module, path, name, state='present', backup=False):
except ImportError:
import simplejson as json
stream = None
try:
try:
stream = open(path, 'r')

Loading…
Cancel
Save