ia64/xen-unstable

changeset 12102:6f0b467a92c6

[XEND] Another attempt at fixing escaping logic in SXP

Signed-off-by: Alastair Tse <atse@xensource.com>
author Alastair Tse <atse@xensource.com>
date Thu Oct 05 20:02:50 2006 +0100 (2006-10-05)
parents 8728365bac33
children c383cb0945a7
files tools/python/xen/xend/sxp.py
line diff
     1.1 --- a/tools/python/xen/xend/sxp.py	Thu Oct 05 19:13:52 2006 +0100
     1.2 +++ b/tools/python/xen/xend/sxp.py	Thu Oct 05 20:02:50 2006 +0100
     1.3 @@ -267,12 +267,13 @@ class Parser:
     1.4          elif c == 'x':
     1.5              self.state.fn = self.state_hex
     1.6              self.state.val = 0
     1.7 -        elif c == '0':
     1.8 +        elif c in string.octdigits:
     1.9              self.state.fn = self.state_octal
    1.10              self.state.val = 0
    1.11              self.input_char(c)
    1.12          else:
    1.13              # ignore escape if it doesn't match anything we know
    1.14 +            self.state.parent.buf += '\\'
    1.15              self.pop_state()
    1.16  
    1.17      def state_octal(self, c):