]> Pileus Git - ~andy/fetchmail/commitdiff
fetchmailconf.py: Accept --help and --version.
authorMatthias Andree <matthias.andree@gmx.de>
Sat, 14 Jan 2006 23:49:27 +0000 (23:49 -0000)
committerMatthias Andree <matthias.andree@gmx.de>
Sat, 14 Jan 2006 23:49:27 +0000 (23:49 -0000)
svn path=/branches/BRANCH_6-3/; revision=4636

NEWS
fetchmailconf.py

diff --git a/NEWS b/NEWS
index ab092f6b08d929f63823a0c23df95f9503b12c15..c16ac65e425cd855ba6c69b88baea8c050390cc2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -58,6 +58,7 @@ fetchmail 6.3.2 (to be released):
 * fetchmail.man: Fix accented characters in Héctor García's name. Merged from
   downstream debian/patches/01_man_page.dpatch. Matthias Andree.
 * Add missing --help text for "--sslcertck" option. Matthias Andree.
+* fetchmailconf.py: Accept --help and --version. Matthias Andree.
 
 fetchmail 6.3.1 (released 2005-12-19):
 
index d6c320b0830f57f2c1b145ffdc872123ade12cc3..ff870233fc7b51d11e079bb9ea0e862c6b560137 100755 (executable)
@@ -5,7 +5,7 @@
 # Matthias Andree <matthias.andree@gmx.de>
 # Requires Python with Tkinter, and the following OS-dependent services:
 #      posix, posixpath, socket
-version = "1.51 $Revision$"
+version = "1.52 $Revision$"
 
 from Tkinter import *
 from Dialog import *
@@ -2035,24 +2035,31 @@ gUSiYASJpMEHhilJTEnhAlGoQqYAZQ1AiqEMZ0jDGtqQImhwwA13yMMevoQAGvGhEAWHGMOAAAA7
 #
 
     # Process options
-    (options, arguments) = getopt.getopt(sys.argv[1:], "df:hV")
+    (options, arguments) = getopt.getopt(sys.argv[1:], "df:hV", ["help",
+           "version"])
     dump = rcfile = None;
     for (switch, val) in options:
        if (switch == '-d'):
            dump = TRUE
        elif (switch == '-f'):
            rcfile = val
-       elif (switch == '-h'):
+       elif (switch == '-h' or switch == '--help'):
            print """
-Usage: fetchmailconf {[-d] [-f fetchmailrc]|-h|-V}
--d       - dump configuration (for debugging)
--f fmrc  - read alternate fetchmailrc file
--      - print this help text and quit
--      - print fetchmailconf version and quit
+Usage: fetchmailconf {[-d] [-f fetchmailrc]|-h|--help|-V|--version}
+           -d      - dump configuration (for debugging)
+           -f fmrc - read alternate fetchmailrc file
+--help,    -h      - print this help text and quit
+--version, -V      - print fetchmailconf version and quit
 """
            sys.exit(0)
-       elif (switch == '-V'):
+       elif (switch == '-V' or switch == '--version'):
            print "fetchmailconf %s" % version
+           print """
+Copyright (C) 1997 - 2003 Eric S. Raymond
+Copyright (C) 2005 - 2006 Matthias Andree
+fetchmailconf comes with ABSOLUTELY NO WARRANTY.  This is free software, you are
+welcome to redistribute it under certain conditions.  Please see the file
+COPYING in the source or documentation directory for details.  """
            sys.exit(0)
 
     # Get client host's FQDN