diff options
author | Stefan Hajnoczi | 2008-05-18 12:37:18 +0200 |
---|---|---|
committer | Michael Brown | 2008-05-20 21:29:24 +0200 |
commit | 711a59cf038a55fee383071308744a2b0864504e (patch) | |
tree | 478f907d71a3343e64b2549a2b36a2e69d86d3a2 | |
parent | [Contribs] Add simple IRC bot for looking up error codes. (diff) | |
download | ipxe-711a59cf038a55fee383071308744a2b0864504e.tar.gz ipxe-711a59cf038a55fee383071308744a2b0864504e.tar.xz ipxe-711a59cf038a55fee383071308744a2b0864504e.zip |
[Contribs] Fix parsing bug in errcode.py
Make sure parser doesn't choke on line with space at end.
-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 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] == ':': |