env info (used by -V and banner): add openssl version

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2017-05-02 17:09:03 +02:00
parent 237d1ce5e7
commit ffeefd9459
1 changed files with 7 additions and 1 deletions

View File

@ -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"""