2
0
mirror of https://github.com/xcat2/xNBA.git synced 2024-12-23 19:51:46 +00:00

[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

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