From ee622618a2cef70b358477e943dff3e375321d7a Mon Sep 17 00:00:00 2001 From: mrstanwell Date: Fri, 3 Jun 2016 00:42:40 -0500 Subject: [PATCH] Strip "\n" from end of OS version string for OS X. If you don't, it ends up in the UserAgent header and you get an error like: Invalid header value 'CertbotACMEClient/0.8.0 (darwin 10.10.5\n)...' --- certbot/util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/certbot/util.py b/certbot/util.py index 8507f80d6..35c599737 100644 --- a/certbot/util.py +++ b/certbot/util.py @@ -325,7 +325,7 @@ def get_python_os_info(): os_ver = subprocess.Popen( ["sw_vers", "-productVersion"], stdout=subprocess.PIPE - ).communicate()[0] + ).communicate()[0].rstrip('\n') elif os_type.startswith('freebsd'): # eg "9.3-RC3-p1" os_ver = os_ver.partition("-")[0]