mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-22 11:22:23 +00:00
Fixed string concatenation in case where there is no lower level error
This commit is contained in:
parent
28a60cbcdb
commit
bb1ff5e7f8
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user