From f7b5db4b5295012b9123cd523131480cb3365f93 Mon Sep 17 00:00:00 2001 From: Krzysztof Kwiatkowski Date: Mon, 4 Jan 2016 13:28:04 +0100 Subject: [PATCH] Check if _create_unverified_context is supported before using it: forgotten file --- juniper-vpn.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/juniper-vpn.py b/juniper-vpn.py index 62d9f97..84500f7 100755 --- a/juniper-vpn.py +++ b/juniper-vpn.py @@ -19,7 +19,8 @@ import hashlib import shlex import tncc -ssl._create_default_https_context = ssl._create_unverified_context +if hasattr(ssl, '_create_unverified_context'): + ssl._create_default_https_context = ssl._create_unverified_context """ OATH code from https://github.com/bdauvergne/python-oath @@ -283,3 +284,4 @@ if __name__ == "__main__": jvpn = juniper_vpn(args) jvpn.run() +