david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[Contribs] Fix parsing bug in errcode.py

Make sure parser doesn't choke on line with space at end.
This commit is contained in:
Stefan Hajnoczi 2008-05-18 11:37:18 +01:00 committed by Michael Brown
parent f43a7e349a
commit 711a59cf03
1 changed files with 4 additions and 1 deletions

View File

@ -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] == ':':