summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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