ia64/xen-unstable

changeset 6935:11475b60d57c

Added diagnostic message to exception when TypeError occurs on write.
author emellor@ewan
date Sat Sep 17 10:49:14 2005 +0100 (2005-09-17)
parents 0b6e06fced6a
children 993f52cdb4e4
files tools/python/xen/xend/xenstore/xstransact.py
line diff
     1.1 --- a/tools/python/xen/xend/xenstore/xstransact.py	Sat Sep 17 10:46:55 2005 +0100
     1.2 +++ b/tools/python/xen/xend/xenstore/xstransact.py	Sat Sep 17 10:49:14 2005 +0100
     1.3 @@ -67,7 +67,12 @@ class xstransact:
     1.4                  if not isinstance(d, dict):
     1.5                      raise TypeError
     1.6                  for key in d.keys():
     1.7 -                    self._write(key, d[key], create, excl)
     1.8 +                    try:
     1.9 +                        self._write(key, d[key], create, excl)
    1.10 +                    except TypeError, msg:
    1.11 +                        raise TypeError('Writing %s: %s: %s' %
    1.12 +                                        (key, str(d[key]), msg))
    1.13 +                        
    1.14          elif isinstance(args[0], list):
    1.15              for l in args:
    1.16                  if not len(l) == 2: