From: Stefan Hajnoczi Date: Sun, 18 May 2008 10:37:18 +0000 (+0100) Subject: [Contribs] Fix parsing bug in errcode.py X-Git-Tag: v0.9.4~157 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=711a59cf038a55fee383071308744a2b0864504e;p=thirdparty%2Fipxe.git [Contribs] Fix parsing bug in errcode.py Make sure parser doesn't choke on line with space at end. --- diff --git a/contrib/errcode/gpxebot.py b/contrib/errcode/gpxebot.py index 4fb2ce1ef..f975942f0 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] == ':':