From: Stefan Hajnoczi Date: Sun, 18 May 2008 10:37:18 +0000 (+0100) Subject: [Contribs] Fix parsing bug in errcode.py X-Git-Url: http://git.etherboot.org/people/pcmattman/gpxe.git/commitdiff_plain/711a59cf038a55fee383071308744a2b0864504e?hp=f43a7e349a07ba29333490dbbac7dfb3d3f8ba5a;ds=sidebyside [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 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] == ':':