[yelp-tools] yelp-check: Use desc if blurb not set on --help for custom checkers
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp-tools] yelp-check: Use desc if blurb not set on --help for custom checkers
- Date: Thu, 4 Feb 2021 02:23:32 +0000 (UTC)
commit e2224eeb4646b013bf25294221728713719d5755
Author: Shaun McCance <shaunm redhat com>
Date: Wed Feb 3 21:23:14 2021 -0500
yelp-check: Use desc if blurb not set on --help for custom checkers
tools/yelp-check.in | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/tools/yelp-check.in b/tools/yelp-check.in
index 25788005..df8580c7 100755
--- a/tools/yelp-check.in
+++ b/tools/yelp-check.in
@@ -243,6 +243,8 @@ class Checker:
#FIXME: prettify names of formats
if self.blurb is not None:
print(self.blurb + '\n')
+ elif self.desc is not None:
+ print(self.desc + '\n')
print('Options:')
maxarglen = 2
args = []
@@ -1126,6 +1128,7 @@ class CustomChecker(Checker):
if self.config is None or (sect not in self.config.sections()):
print('Unrecognized command: ' + self.name, file=sys.stderr)
return 1
+ self.desc = self.config.get(sect, 'desc', fallback=None)
self.blurb = self.config.get(sect, 'blurb', fallback=None)
if self.blurb is not None:
self.blurb = '\n'.join(textwrap.wrap(self.blurb))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]