summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Puryear <philippuryear@gmail.com>2012-10-26 03:43:03 (GMT)
committerPhilip Puryear <philippuryear@gmail.com>2012-10-26 03:43:03 (GMT)
commit10a0a7d9659591c44bba1ab74b069c9313a47dfa (patch)
treed37cd8fa1d13aa0d7648d7947d9bdd3e74591273
parent13db3daadc2fb30320de90fe7667ab1cf9166799 (diff)
downloadNinja-10a0a7d9659591c44bba1ab74b069c9313a47dfa.zip
Ninja-10a0a7d9659591c44bba1ab74b069c9313a47dfa.tar.gz
Ninja-10a0a7d9659591c44bba1ab74b069c9313a47dfa.tar.bz2
browse.py: Fix truncation with an unknown target.
Signed-off-by: Philip Puryear <philippuryear@gmail.com>
-rwxr-xr-xsrc/browse.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/browse.py b/src/browse.py
index 6bbf4de..bf4ff49 100755
--- a/src/browse.py
+++ b/src/browse.py
@@ -60,7 +60,9 @@ def parse(text):
outputs = []
try:
- target = next(lines)[:-1] # strip trailing colon
+ target = next(lines)
+ if target.endswith(':'):
+ target = target[:-1] # strip trailing colon
line = next(lines)
(match, rule) = match_strip(line, ' input: ')