diff options
author | Sebastian Schuberth <sschuberth@gmail.com> | 2019-04-17 19:08:52 +0200 |
---|---|---|
committer | Sebastian Schuberth <sschuberth@gmail.com> | 2019-04-17 19:46:05 +0200 |
commit | 266f74c88844aa58189af4343aac2467c4b105f0 (patch) | |
tree | ef3b933c53c8462a55c9cbf78b7a1f9b8dae4e03 /subcmds/info.py | |
parent | 1f1596b4735e8d27445a5044fd39b2c17555ef80 (diff) | |
download | git-repo-266f74c88844aa58189af4343aac2467c4b105f0.tar.gz |
info: Use the non-formatting printer for headtext
If "repo init" was run in a path containing "%", "repo info" would fail
printing the path with
File ".repo/repo/color.py", line 173, in f
return fmt % args
TypeError: not enough arguments for format string
as the "%" in the path name is interpreted as the start of a formatting
specifier. Avoid that by using the non-formatting printer for headtext
which does not require any formatting so there is no need to try to
expand "%" sequences.
Change-Id: Ie193b912191fe7cdabdce5c97bb100f0714f6e76
Signed-off-by: Sebastian Schuberth <sschuberth@gmail.com>
Diffstat (limited to 'subcmds/info.py')
-rw-r--r-- | subcmds/info.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/subcmds/info.py b/subcmds/info.py index ed196e90..f2827b34 100644 --- a/subcmds/info.py +++ b/subcmds/info.py | |||
@@ -45,7 +45,7 @@ class Info(PagedCommand): | |||
45 | def Execute(self, opt, args): | 45 | def Execute(self, opt, args): |
46 | self.out = _Coloring(self.manifest.globalConfig) | 46 | self.out = _Coloring(self.manifest.globalConfig) |
47 | self.heading = self.out.printer('heading', attr = 'bold') | 47 | self.heading = self.out.printer('heading', attr = 'bold') |
48 | self.headtext = self.out.printer('headtext', fg = 'yellow') | 48 | self.headtext = self.out.nofmt_printer('headtext', fg = 'yellow') |
49 | self.redtext = self.out.printer('redtext', fg = 'red') | 49 | self.redtext = self.out.printer('redtext', fg = 'red') |
50 | self.sha = self.out.printer("sha", fg = 'yellow') | 50 | self.sha = self.out.printer("sha", fg = 'yellow') |
51 | self.text = self.out.nofmt_printer('text') | 51 | self.text = self.out.nofmt_printer('text') |