[PATCH] have --version ONLY print the version number

Sebastian Spaeth Sebastian at SSpaeth.de
Wed Jan 26 08:20:18 GMT 2011


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 at SSpaeth.de>
---
I wouldn't mind if --version really only outputted the raw version
number. The copyright stuff is still shown often enough in my opinion.

 offlineimap/init.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/offlineimap/init.py b/offlineimap/init.py
index 309a757..186aa81 100644
--- a/offlineimap/init.py
+++ b/offlineimap/init.py
@@ -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__))
-- 
1.7.1





More information about the OfflineIMAP-project mailing list