# HG changeset patch
# User emellor@ewan
# Node ID 11475b60d57ca94e98d5e4977c424fbc42a701b2
# Parent 0b6e06fced6a0443c47b0076b2c107bdb68c168b
Added diagnostic message to exception when TypeError occurs on write.
diff -r 0b6e06fced6a -r 11475b60d57c
tools/python/xen/xend/xenstore/xstransact.py
--- a/tools/python/xen/xend/xenstore/xstransact.py Sat Sep 17 09:46:55 2005
+++ b/tools/python/xen/xend/xenstore/xstransact.py Sat Sep 17 09:49:14 2005
@@ -67,7 +67,12 @@
if not isinstance(d, dict):
raise TypeError
for key in d.keys():
- self._write(key, d[key], create, excl)
+ try:
+ self._write(key, d[key], create, excl)
+ except TypeError, msg:
+ raise TypeError('Writing %s: %s: %s' %
+ (key, str(d[key]), msg))
+
elif isinstance(args[0], list):
for l in args:
if not len(l) == 2:
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|