From c177f944d95c460803f8a894fd13d4901c3155fe Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 4 May 2021 08:06:36 -0400 Subject: subcmds: force consistent help text format We're inconsistent with help text as to whether it uses title case and whether it ends in a period. Add a test to enforce a standard, and use the style that Python optparse & argparse use themselves (e.g. with the --help option): always lowercase, and never trailing period. Change-Id: Ic1defae23daeac0ac9116aaf487427f50b34050d Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/305144 Reviewed-by: Raman Tenneti Tested-by: Mike Frysinger --- subcmds/sync.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'subcmds/sync.py') diff --git a/subcmds/sync.py b/subcmds/sync.py index e5280865..31760e5c 100644 --- a/subcmds/sync.py +++ b/subcmds/sync.py @@ -169,10 +169,11 @@ later is required to fix a server side protocol bug. PARALLEL_JOBS = 1 def _CommonOptions(self, p): - try: - self.PARALLEL_JOBS = self.manifest.default.sync_j - except ManifestParseError: - pass + if self.manifest: + try: + self.PARALLEL_JOBS = self.manifest.default.sync_j + except ManifestParseError: + pass super()._CommonOptions(p) def _Options(self, p, show_smart=True): -- cgit v1.2.3-54-g00ecf