diff --git a/offlineimap/init.py b/offlineimap/init.py index ad7f982..22afb9c 100644 --- a/offlineimap/init.py +++ b/offlineimap/init.py @@ -1,5 +1,5 @@ # OfflineIMAP initialization code -# Copyright (C) 2002-2016 John Goerzen & contributors +# Copyright (C) 2002-2017 John Goerzen & contributors # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -72,6 +72,11 @@ class OfflineImap(object): oi.run() """ + def get_env_info(self): + return "imaplib2 v%s (%s), Python v%s"% ( + imaplib.__version__, imaplib.DESC, PYTHON_VERSION + ) + def run(self): """Parse the commandline and invoke everything""" # next line also sets self.config and self.ui @@ -180,9 +185,8 @@ class OfflineImap(object): glob.set_options(options) if options.version: - print("offlineimap v%s, imaplib2 v%s (%s), Python v%s"% ( - offlineimap.__version__, imaplib.__version__, imaplib.DESC, - PYTHON_VERSION) + print("offlineimap v%s, %s"% ( + offlineimap.__version__, self.get_env_info()) ) sys.exit(0) @@ -273,6 +277,7 @@ class OfflineImap(object): # Welcome blurb. self.ui.init_banner() + self.ui.info(self.get_env_info()) if options.debugtype: self.ui.logger.setLevel(logging.DEBUG)