commit 998b25cdb69581c5f98395c39df325bffe0e5178
parent 7852a3f5446dce0182f7eeaccf37e7a34e49bee6
Author: Solderpunk <solderpunk@sdf.org>
Date: Sun, 25 Aug 2019 16:26:45 +0300
Try to get Python 3.4 working...
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/av98.py b/av98.py
@@ -371,7 +371,8 @@ Slow internet connection? Use 'set timeout' to be more patient.""")
self._debug("Connecting to: " + str(address[4]))
s = socket.socket(address[0], address[1])
s.settimeout(self.options["timeout"])
- context = ssl.SSLContext()
+ protocol = ssl.PROTOCOL_TLSv1_2 if sys.version_info.minor < 5 else ssl.PROTOCOL_TLS
+ context = ssl.SSLContext(protocol)
context.check_hostname = False
context.verify_mode = ssl.CERT_NONE
# Impose minimum TLS version