summaryrefslogtreecommitdiffstats
path: root/libvir.py
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2006-11-10 19:55:27 +0000
committerDaniel P. Berrange <berrange@redhat.com>2006-11-10 19:55:27 +0000
commite8a0109538b79471154739ee341b941170cf76f9 (patch)
treee235df8b86261a588bae8fac24ad6b5f598ba438 /libvir.py
parent0de5f70534043c651d19bb86b29e11a5e97fc5f5 (diff)
downloadlibvirt-python-v6-e8a0109538b79471154739ee341b941170cf76f9.tar.gz
libvirt-python-v6-e8a0109538b79471154739ee341b941170cf76f9.tar.xz
libvirt-python-v6-e8a0109538b79471154739ee341b941170cf76f9.zip
Fixed string concatenation in case where there is no lower level error
Diffstat (limited to 'libvir.py')
-rw-r--r--libvir.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/libvir.py b/libvir.py
index b0f0b2c..dc4bc29 100644
--- a/libvir.py
+++ b/libvir.py
@@ -63,7 +63,10 @@ class libvirtError(Exception):
return self.err[8]
def __str__(self):
- return Exception.__str__(self) + " " + self.get_error_message()
+ if self.get_error_message() is None:
+ return Exception.__str__(self)
+ else:
+ return Exception.__str__(self) + " " + self.get_error_message()
#
# register the libvirt global error handler