From 298d73a1a79705c9df05a37cd091218ed488914a Mon Sep 17 00:00:00 2001 From: Robert Bo Davis Date: Thu, 26 Jul 2018 08:43:06 -0400 Subject: [PATCH] Fix referenced before assignment in role requirements --- lib/ansible/playbook/role/requirement.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/ansible/playbook/role/requirement.py b/lib/ansible/playbook/role/requirement.py index fb59a3dba5..9f3838cfef 100644 --- a/lib/ansible/playbook/role/requirement.py +++ b/lib/ansible/playbook/role/requirement.py @@ -190,6 +190,8 @@ class RoleRequirement(RoleDefinition): def run_scm_cmd(cmd, tempdir): try: + stdout = None + stderr = None popen = Popen(cmd, cwd=tempdir, stdout=PIPE, stderr=PIPE) stdout, stderr = popen.communicate() except Exception as e: