From e1e8861a6e0df3e774d6db3ac98ee22d78f478a5 Mon Sep 17 00:00:00 2001 From: Alan Hamlett Date: Mon, 30 Sep 2013 06:58:12 -0700 Subject: [PATCH] better check for SSL support using socket.ssl --- WakaTime.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WakaTime.py b/WakaTime.py index 24741ec..6810a63 100644 --- a/WakaTime.py +++ b/WakaTime.py @@ -35,8 +35,10 @@ LOCK = threading.RLock() # check if we have SSL support try: import ssl + import socket + socket.ssl HAS_SSL = True -except ImportError: +except (ImportError, AttributeError): from subprocess import Popen if HAS_SSL: