mirror of
https://github.com/xcat2/xNBA.git
synced 2024-11-22 01:21:45 +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:
parent
f43a7e349a
commit
711a59cf03
@ -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] == ':':
|
||||
|
Loading…
Reference in New Issue
Block a user