ia64/xen-unstable

changeset 3252:380b3684683c

bitkeeper revision 1.1159.187.57 (41b5eb65x_JxVnjR7uA3FzGZDy11Hw)

xend fixes.
author kaf24@scramble.cl.cam.ac.uk
date Tue Dec 07 17:41:57 2004 +0000 (2004-12-07)
parents 0e6cf5ea9f5c
children fff7508e0e56 6bb19295b5d3
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:14:02 2004 +0000
     1.2 +++ b/tools/python/xen/xend/encode.py	Tue Dec 07 17:41:57 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:14:02 2004 +0000
     2.2 +++ b/tools/python/xen/xend/sxp.py	Tue Dec 07 17:41:57 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