mirror of
https://github.com/certbot/certbot.git
synced 2026-07-27 00:00:44 +02:00
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)...'
This commit is contained in:
+1
-1
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user