From 978e6d2cd6bd8e56d14a23ec2005ab342c81a450 Mon Sep 17 00:00:00 2001 From: Joost Cassee Date: Wed, 30 Apr 2014 21:46:37 +0200 Subject: [PATCH] Make concatenating certs robust in urls.py Add a newline after each certificate file explicitly to avoid problems with files that do not end with a newline themselves. --- lib/ansible/module_utils/urls.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/ansible/module_utils/urls.py b/lib/ansible/module_utils/urls.py index 2e6808b4e6..d80ea76bf8 100644 --- a/lib/ansible/module_utils/urls.py +++ b/lib/ansible/module_utils/urls.py @@ -154,6 +154,7 @@ class SSLValidationHandler(urllib2.BaseHandler): try: cert_file = open(full_path, 'r') os.write(tmp_fd, cert_file.read()) + os.write(tmp_fd, '\n') cert_file.close() except: pass