debuggers.hg
changeset 3291:fff7508e0e56
bitkeeper revision 1.1159.183.46 (41b5ebf5bJeqSvY1QhrHpwnbQmtSbA)
Merge scramble.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into scramble.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
Merge scramble.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-2.0-testing.bk
into scramble.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xen-unstable.bk
author | kaf24@scramble.cl.cam.ac.uk |
---|---|
date | Tue Dec 07 17:44:21 2004 +0000 (2004-12-07) |
parents | fc7b350be00f 380b3684683c |
children | 631910906413 |
files | tools/python/xen/xend/encode.py tools/python/xen/xend/sxp.py |
line diff
1.1 --- a/tools/python/xen/xend/encode.py Thu Dec 02 21:15:40 2004 +0000 1.2 +++ b/tools/python/xen/xend/encode.py Tue Dec 07 17:44:21 2004 +0000 1.3 @@ -14,6 +14,8 @@ import httplib 1.4 import random 1.5 import md5 1.6 1.7 +from xen.util.ip import _readline, _readlines 1.8 + 1.9 # Extract from HTML4 spec. 1.10 ## The following example illustrates "multipart/form-data" 1.11 ## encoding. Suppose we have the following form: 1.12 @@ -122,7 +124,7 @@ def encode_multipart(d): 1.13 out.write('"\r\n') 1.14 out.write('Content-Type: application/octet-stream\r\n') 1.15 out.write('\r\n') 1.16 - for l in v.readlines(): 1.17 + for l in _readlines(v): 1.18 out.write(l) 1.19 else: 1.20 out.write('Content-Disposition: form-data; name="')
2.1 --- a/tools/python/xen/xend/sxp.py Thu Dec 02 21:15:40 2004 +0000 2.2 +++ b/tools/python/xen/xend/sxp.py Tue Dec 07 17:44:21 2004 +0000 2.3 @@ -17,6 +17,7 @@ import types 2.4 import errno 2.5 import string 2.6 from StringIO import StringIO 2.7 +from xen.util.ip import _readline, _readlines 2.8 2.9 __all__ = [ 2.10 "mime_type", 2.11 @@ -713,7 +714,7 @@ def parse(io): 2.12 """ 2.13 pin = Parser() 2.14 while 1: 2.15 - buf = io.readline() 2.16 + buf = _readline(io) 2.17 pin.input(buf) 2.18 if len(buf) == 0: 2.19 break