diff options
author | Stefan Hajnoczi <stefanha@gmail.com> | 2008-05-18 11:37:18 +0100 |
---|---|---|
committer | Michael Brown <mcb30@etherboot.org> | 2008-05-20 20:29:24 +0100 |
commit | 711a59cf038a55fee383071308744a2b0864504e (patch) | |
tree | 478f907d71a3343e64b2549a2b36a2e69d86d3a2 /contrib | |
parent | f43a7e349a07ba29333490dbbac7dfb3d3f8ba5a (diff) | |
download | ipxe-711a59cf038a55fee383071308744a2b0864504e.tar.gz |
[Contribs] Fix parsing bug in errcode.py
Make sure parser doesn't choke on line with space at end.
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/errcode/gpxebot.py | 5 |
1 files changed, 4 insertions, 1 deletions
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] == ':': |