diff options
author | Sebastian Schmidt <yath@yath.de> | 2010-06-02 17:18:13 +0200 |
---|---|---|
committer | Shawn O. Pearce <sop@google.com> | 2010-06-17 19:09:37 -0700 |
commit | feb39d61ef2de893b93153adc8f1f8140a54fc98 (patch) | |
tree | 51c358f6ab4424ad698446ed4bdbc85e9a0d942f /subcmds/grep.py | |
parent | 7198572dd7f5b9d95d83733a98691948a3eb9da3 (diff) | |
download | git-repo-feb39d61ef2de893b93153adc8f1f8140a54fc98.tar.gz |
Fix format string bugs in grepv1.6.9.8
This fixes some format string bugs in grep which cause repo to with
"TypeError: not enough arguments for format string" when grepping and
the output contains a valid Python format string.
Change-Id: Ice8968ea106148d409490e4f71a2833b0cc80816
Diffstat (limited to 'subcmds/grep.py')
-rw-r--r-- | subcmds/grep.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/subcmds/grep.py b/subcmds/grep.py index 4f714271..1cb5650b 100644 --- a/subcmds/grep.py +++ b/subcmds/grep.py | |||
@@ -204,7 +204,7 @@ contain a line that matches both expressions: | |||
204 | else: | 204 | else: |
205 | out.project('--- project %s ---' % project.relpath) | 205 | out.project('--- project %s ---' % project.relpath) |
206 | out.nl() | 206 | out.nl() |
207 | out.write(p.stderr) | 207 | out.write("%s", p.stderr) |
208 | out.nl() | 208 | out.nl() |
209 | continue | 209 | continue |
210 | have_match = True | 210 | have_match = True |
@@ -217,17 +217,17 @@ contain a line that matches both expressions: | |||
217 | if have_rev and full_name: | 217 | if have_rev and full_name: |
218 | for line in r: | 218 | for line in r: |
219 | rev, line = line.split(':', 1) | 219 | rev, line = line.split(':', 1) |
220 | out.write(rev) | 220 | out.write("%s", rev) |
221 | out.write(':') | 221 | out.write(':') |
222 | out.project(project.relpath) | 222 | out.project(project.relpath) |
223 | out.write('/') | 223 | out.write('/') |
224 | out.write(line) | 224 | out.write("%s", line) |
225 | out.nl() | 225 | out.nl() |
226 | elif full_name: | 226 | elif full_name: |
227 | for line in r: | 227 | for line in r: |
228 | out.project(project.relpath) | 228 | out.project(project.relpath) |
229 | out.write('/') | 229 | out.write('/') |
230 | out.write(line) | 230 | out.write("%s", line) |
231 | out.nl() | 231 | out.nl() |
232 | else: | 232 | else: |
233 | for line in r: | 233 | for line in r: |