From ffeefd9459842095464067970ba1753769cd3430 Mon Sep 17 00:00:00 2001 From: Nicolas Sebrecht Date: Tue, 2 May 2017 17:09:03 +0200 Subject: [PATCH] env info (used by -V and banner): add openssl version Signed-off-by: Nicolas Sebrecht --- offlineimap/init.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/offlineimap/init.py b/offlineimap/init.py index 22afb9c..a11a25a 100644 --- a/offlineimap/init.py +++ b/offlineimap/init.py @@ -73,9 +73,15 @@ class OfflineImap(object): """ def get_env_info(self): - return "imaplib2 v%s (%s), Python v%s"% ( + info = "imaplib2 v%s (%s), Python v%s"% ( imaplib.__version__, imaplib.DESC, PYTHON_VERSION ) + try: + import ssl + info = "%s, %s"% (info, ssl.OPENSSL_VERSION) + except: + pass + return info def run(self): """Parse the commandline and invoke everything"""