issue #61: unused variable (reported by LGTM)

issue510
David Wilson 7 years ago
parent bcc7bb7128
commit b8ca015b83

@ -205,15 +205,13 @@ class ScriptPlanner(BinaryPlanner):
involved here, the vanilla implementation uses it and that use is involved here, the vanilla implementation uses it and that use is
exploited in common playbooks. exploited in common playbooks.
""" """
key = u'ansible_%s_interpreter' % os.path.basename(path).strip()
try: try:
key = u'ansible_%s_interpreter' % os.path.basename(path).strip()
template = self._inv.task_vars[key] template = self._inv.task_vars[key]
except KeyError: except KeyError:
return path return path
return mitogen.utils.cast( return mitogen.utils.cast(self._inv.templar.template(template))
self._inv.templar.template(self._inv.task_vars[key])
)
def _get_interpreter(self): def _get_interpreter(self):
path, arg = ansible_mitogen.parsing.parse_hashbang( path, arg = ansible_mitogen.parsing.parse_hashbang(

Loading…
Cancel
Save