Fix name error exception

This patch fixes following exception when pacemaker resource
is not running on a tested node:

Change-Id: I8a3ca3343b75b453e05552dbffd22ba27812bcaf
NameError: global name 'resource' is not defined
This commit is contained in:
Martin Mágr 2017-10-25 11:58:57 +02:00
parent 62160d1068
commit b95298f62b
1 changed files with 4 additions and 2 deletions

View File

@ -62,8 +62,10 @@ def _check_resource_in_host(remaining, match_word, options, local_hostname):
for host in host_list:
if host == local_hostname:
_ok_run_script(options)
utils.ok("pacemaker resource %s doesn't on this node "
"(but on %s)" % (resource, patterns.group(2)))
utils.ok(
"pacemaker resource %s doesn't run on this node "
"(but on %s)" % (options.pacemaker_resource, patterns.group(2))
)
def _pacemaker_host_check():
parser = argparse.ArgumentParser(