From d6d8338a07b39e19ef8243cbbea48617096bfba1 Mon Sep 17 00:00:00 2001 From: "Daniel P. Berrange" Date: Tue, 20 Jan 2009 22:10:52 +0000 Subject: Use global thread-local error for all python error reporting --- libvir.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'libvir.py') 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: -- cgit