summaryrefslogtreecommitdiffstats
path: root/libvir.py
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2009-01-20 22:10:52 +0000
committerDaniel P. Berrange <berrange@redhat.com>2009-01-20 22:10:52 +0000
commitd6d8338a07b39e19ef8243cbbea48617096bfba1 (patch)
tree61df26d7cda46c622778afe2e6d9ec4449194199 /libvir.py
parent92583135c8a6576176511c92154a8806873a0beb (diff)
downloadlibvirt-python-split-d6d8338a07b39e19ef8243cbbea48617096bfba1.tar.gz
libvirt-python-split-d6d8338a07b39e19ef8243cbbea48617096bfba1.tar.xz
libvirt-python-split-d6d8338a07b39e19ef8243cbbea48617096bfba1.zip
Use global thread-local error for all python error reportingv0.6.0
Diffstat (limited to 'libvir.py')
-rw-r--r--libvir.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/libvir.py b/libvir.py
index b90f795..8a16dd0 100644
--- a/libvir.py
+++ b/libvir.py
@@ -26,10 +26,9 @@ class libvirtError(Exception):
elif vol is not None:
conn = vol._conn
- if conn is None:
- err = virGetLastError()
- else:
- err = conn.virConnGetLastError()
+ # Never call virConnGetLastError().
+ # virGetLastError() is now thread local
+ err = virGetLastError()
if err is None:
msg = defmsg
else: