http://git.etherboot.org
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f43a7e3
)
[Contribs] Fix parsing bug in errcode.py
author
Stefan Hajnoczi
<stefanha@gmail.com>
Sun, 18 May 2008 10:37:18 +0000
(11:37 +0100)
committer
Michael Brown
<mcb30@etherboot.org>
Tue, 20 May 2008 19:29:24 +0000
(20:29 +0100)
Make sure parser doesn't choke on line with space at end.
contrib/errcode/gpxebot.py
patch
|
blob
|
history
diff --git
a/contrib/errcode/gpxebot.py
b/contrib/errcode/gpxebot.py
index
4fb2ce1
..
f975942
100755
(executable)
--- 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] == ':':