Commit 05f5b5b2 by Juha Litola

Fixed add_key stalling indefinitely, and test code leaking into production setting

parent 58618474
......@@ -105,7 +105,7 @@ def download_key(url):
def add_key(key):
return call("apt-key add -", shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
p = Popen("apt-key add -", shell=True, stdin=PIPE, stdout=PIPE, stderr=PIPE)
(_, _) = p.communicate(key)
return p.returncode == 0
......@@ -163,12 +163,12 @@ if 'ANSIBLE_TEST_APT_KEY' in environ:
return extra
if environ.get('ANSIBLE_TEST_APT_KEY') == 'none':
def key_present(key_id):
return False
else:
def key_present(key_id):
return key_id == environ['ANSIBLE_TEST_APT_KEY']
if environ.get('ANSIBLE_TEST_APT_KEY') == 'none':
def key_present(key_id):
return False
else:
def key_present(key_id):
return key_id == environ['ANSIBLE_TEST_APT_KEY']
def main():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment