summaryrefslogtreecommitdiffstats
path: root/libvir.py
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2007-04-16 12:37:59 +0000
committerDaniel P. Berrange <berrange@redhat.com>2007-04-16 12:37:59 +0000
commit33af9b643ad0c342bb058453ae50035e8abdbb0e (patch)
tree9b36f1705f1287c514a87e0cc3039050b03f1ad4 /libvir.py
parent09e33225d13297467fd7fd863ea55cbe04b3f486 (diff)
downloadlibvirt-python-split-33af9b643ad0c342bb058453ae50035e8abdbb0e.tar.gz
libvirt-python-split-33af9b643ad0c342bb058453ae50035e8abdbb0e.tar.xz
libvirt-python-split-33af9b643ad0c342bb058453ae50035e8abdbb0e.zip
Fixed exception reporting for domain/network operationsv0.2.2
Diffstat (limited to 'libvir.py')
-rw-r--r--libvir.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/libvir.py b/libvir.py
index dc4bc29..e1c4ff3 100644
--- a/libvir.py
+++ b/libvir.py
@@ -9,9 +9,14 @@ import types
# The root of all libvirt errors.
class libvirtError(Exception):
- def __init__(self, msg, conn=None):
+ def __init__(self, msg, conn=None, dom=None, net=None):
Exception.__init__(self, msg)
+ if dom is not None:
+ conn = dom._conn
+ elif net is not None:
+ conn = net._conn
+
if conn is None:
self.err = virGetLastError()
else: