diff --git a/tools/python/xen/xend/sxp.py b/tools/python/xen/xend/sxp.py index af7cb9c0c2..a9e9adf17f 100644 --- a/tools/python/xen/xend/sxp.py +++ b/tools/python/xen/xend/sxp.py @@ -267,12 +267,13 @@ class Parser: elif c == 'x': self.state.fn = self.state_hex self.state.val = 0 - elif c == '0': + elif c in string.octdigits: self.state.fn = self.state_octal self.state.val = 0 self.input_char(c) else: # ignore escape if it doesn't match anything we know + self.state.parent.buf += '\\' self.pop_state() def state_octal(self, c):