diff options
author | Philip Puryear <philippuryear@gmail.com> | 2012-10-26 03:43:03 (GMT) |
---|---|---|
committer | Philip Puryear <philippuryear@gmail.com> | 2012-10-26 03:43:03 (GMT) |
commit | 10a0a7d9659591c44bba1ab74b069c9313a47dfa (patch) | |
tree | d37cd8fa1d13aa0d7648d7947d9bdd3e74591273 | |
parent | 13db3daadc2fb30320de90fe7667ab1cf9166799 (diff) | |
download | Ninja-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-x | src/browse.py | 4 |
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: ') |