From 711a59cf038a55fee383071308744a2b0864504e Mon Sep 17 00:00:00 2001 From: Stefan Hajnoczi Date: Sun, 18 May 2008 11:37:18 +0100 Subject: [Contribs] Fix parsing bug in errcode.py Make sure parser doesn't choke on line with space at end. --- contrib/errcode/gpxebot.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'contrib') diff --git a/contrib/errcode/gpxebot.py b/contrib/errcode/gpxebot.py index 4fb2ce1e..f975942f 100755 --- a/contrib/errcode/gpxebot.py +++ b/contrib/errcode/gpxebot.py @@ -88,7 +88,10 @@ def parse(line): who = None args = [] while line and line[0] != ':' and line.find(' ') != -1: - arg, line = line.split(None, 1) + fields = line.split(None, 1) + if len(fields) == 1: + fields.append(None) + arg, line = fields args.append(arg) if line: if line[0] == ':': -- cgit v1.2.3-55-g7522