From 266f74c88844aa58189af4343aac2467c4b105f0 Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Wed, 17 Apr 2019 19:08:52 +0200 Subject: [PATCH] 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 --- subcmds/info.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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): def Execute(self, opt, args): self.out = _Coloring(self.manifest.globalConfig) self.heading = self.out.printer('heading', attr = 'bold') - self.headtext = self.out.printer('headtext', fg = 'yellow') + self.headtext = self.out.nofmt_printer('headtext', fg = 'yellow') self.redtext = self.out.printer('redtext', fg = 'red') self.sha = self.out.printer("sha", fg = 'yellow') self.text = self.out.nofmt_printer('text')