From 10a0a7d9659591c44bba1ab74b069c9313a47dfa Mon Sep 17 00:00:00 2001 From: Philip Puryear Date: Thu, 25 Oct 2012 22:43:03 -0500 Subject: browse.py: Fix truncation with an unknown target. Signed-off-by: Philip Puryear --- src/browse.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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: ') -- cgit v0.12