show python version for -V CLI option

Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Nicolas Sebrecht 2016-08-15 04:53:23 +02:00
parent 5608dea76c
commit 1884fd7ef6

View File

@ -34,7 +34,10 @@ from offlineimap.utils import stacktrace
from offlineimap.repository import Repository from offlineimap.repository import Repository
from offlineimap.folder.IMAP import MSGCOPY_NAMESPACE from offlineimap.folder.IMAP import MSGCOPY_NAMESPACE
ACCOUNT_LIMITED_THREAD_NAME = 'MAX_ACCOUNTS' ACCOUNT_LIMITED_THREAD_NAME = 'MAX_ACCOUNTS'
PYTHON_VERSION = sys.version.split(' ')[0]
def syncitall(list_accounts, config): def syncitall(list_accounts, config):
"""The target when in multithreading mode for running accounts threads.""" """The target when in multithreading mode for running accounts threads."""
@ -173,8 +176,10 @@ class OfflineImap(object):
globals.set_options (options) globals.set_options (options)
if options.version: if options.version:
print("offlineimap v%s, imaplib2 v%s (%s)"% ( print("offlineimap v%s, imaplib2 v%s (%s), Python v%s"% (
offlineimap.__version__, imaplib.__version__, imaplib.DESC)) offlineimap.__version__, imaplib.__version__, imaplib.DESC,
PYTHON_VERSION)
)
sys.exit(0) sys.exit(0)
# Read in configuration file. # Read in configuration file.