From 4d790d3decdaf94c5237a1d42a6cb1f6f3ba2e99 Mon Sep 17 00:00:00 2001 From: calvin Date: Thu, 27 Jan 2005 11:29:48 +0000 Subject: [PATCH] return value doc, fix optparse format_message git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@2212 e7d03fd6-7b0d-0410-9947-9c21f3af8025 --- linkchecker | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/linkchecker b/linkchecker index c57d36b1..82797989 100755 --- a/linkchecker +++ b/linkchecker @@ -77,6 +77,13 @@ o When checking 'news:' links the given NNTP host doesn't need to be the same as the host of the user browsing your pages! """) +Retval = _(r"""RETURN VALUE +The return value is non-zero when + o invalid links were found or + o link warnings were found and --warnings option was given + o a program error occurred +""") + Examples = _(r"""EXAMPLES The most common use checks the given domain recursively, plus any single URL pointing outside of the domain: @@ -184,7 +191,7 @@ class LCHelpFormatter (optparse.IndentedHelpFormatter): # -fFILENAME, --file=FILENAME # read data from FILENAME result = [] - opts = option.option_strings + opts = self.option_strings[option] opt_width = self.help_position - self.current_indent - 2 if len(opts) > opt_width: opts = "%*s%s\n" % (self.current_indent, "", opts) @@ -221,7 +228,7 @@ class LCOptionParser (optparse.OptionParser, object): def print_help (self, file=None): """print translated help text""" - s = "%s\n%s\n%s" % (self.format_help(), Notes, Examples) + s = "%s\n%s\n%s\n%s" % (self.format_help(), Notes, Retval, Examples) if os.name != 'posix': linkcheck.StringUtil.paginate(s) else: