diff options
author | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2004-12-07 17:41:57 +0000 |
---|---|---|
committer | kaf24@scramble.cl.cam.ac.uk <kaf24@scramble.cl.cam.ac.uk> | 2004-12-07 17:41:57 +0000 |
commit | aee895495538183454bf8b3f85acdadd35a4ab3d (patch) | |
tree | b3dc762097730d9b01b47b89d085029da19a61e5 | |
parent | fdea3f84ab2ad172334572350a016acca72039a7 (diff) | |
download | xen-aee895495538183454bf8b3f85acdadd35a4ab3d.tar.gz xen-aee895495538183454bf8b3f85acdadd35a4ab3d.tar.bz2 xen-aee895495538183454bf8b3f85acdadd35a4ab3d.zip |
bitkeeper revision 1.1159.187.57 (41b5eb65x_JxVnjR7uA3FzGZDy11Hw)
xend fixes.
-rw-r--r-- | tools/python/xen/xend/encode.py | 4 | ||||
-rw-r--r-- | tools/python/xen/xend/sxp.py | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/tools/python/xen/xend/encode.py b/tools/python/xen/xend/encode.py index 38c9351db7..48815defa9 100644 --- a/tools/python/xen/xend/encode.py +++ b/tools/python/xen/xend/encode.py @@ -14,6 +14,8 @@ import httplib import random import md5 +from xen.util.ip import _readline, _readlines + # Extract from HTML4 spec. ## The following example illustrates "multipart/form-data" ## encoding. Suppose we have the following form: @@ -122,7 +124,7 @@ def encode_multipart(d): out.write('"\r\n') out.write('Content-Type: application/octet-stream\r\n') out.write('\r\n') - for l in v.readlines(): + for l in _readlines(v): out.write(l) else: out.write('Content-Disposition: form-data; name="') diff --git a/tools/python/xen/xend/sxp.py b/tools/python/xen/xend/sxp.py index 98cc303416..35b24aa8aa 100644 --- a/tools/python/xen/xend/sxp.py +++ b/tools/python/xen/xend/sxp.py @@ -17,6 +17,7 @@ import types import errno import string from StringIO import StringIO +from xen.util.ip import _readline, _readlines __all__ = [ "mime_type", @@ -713,7 +714,7 @@ def parse(io): """ pin = Parser() while 1: - buf = io.readline() + buf = _readline(io) pin.input(buf) if len(buf) == 0: break |