have --version ONLY print the version number

Make --version much less verbose and only print out the version number
to facilitate easy parsing by scripts. We don't really need the verbose
copyright output, it is show with --help anyway.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
This commit is contained in:
Sebastian Spaeth 2011-01-26 09:20:18 +01:00 committed by Nicolas Sebrecht
parent fa60f3f9b7
commit 776b5173db
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,8 @@ New Features
Changes
-------
* have --version ONLY print the version number
Bug Fixes
---------

View File

@ -60,7 +60,7 @@ class OfflineImap:
def run(self):
"""Parse the commandline and invoke everything"""
parser = OptionParser(version=offlineimap.banner,
parser = OptionParser(version=offlineimap.__version__,
description="%s.\n\n%s" %
(offlineimap.__copyright__,
offlineimap.__license__))