mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 10:40:03 +01:00
Added diagnostic message to exception when TypeError occurs on write.
This commit is contained in:
1 parent
fd3926cff3
commit
b7411027d6
1 file changed
+6
-1
@@ -67,7 +67,12 @@ class xstransact:
|
||||
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:
|
||||
|
||||