[libvirt] [PATCH python] virStream.sendAll() fix raising an undeclared var
Doug Goldstein
cardoe at cardoe.com
Sat Jan 11 03:18:01 UTC 2014
The exception is raised from the variable 'e', which was undeclared in
this context. Used code that is compatible with old and new Python
versions.
---
libvirt-override-virStream.py | 1 +
1 file changed, 1 insertion(+)
diff --git a/libvirt-override-virStream.py b/libvirt-override-virStream.py
index 189d062..cd44314 100644
--- a/libvirt-override-virStream.py
+++ b/libvirt-override-virStream.py
@@ -76,6 +76,7 @@
try:
got = handler(self, 1024*64, opaque)
except:
+ e = sys.exc_info()[1]
try:
self.abort()
except:
--
1.8.3.2
More information about the libvir-list
mailing list