safer error class

stix2.0
= 2018-05-22 10:03:06 -04:00
parent e484b7c25f
commit 3fb1840289
1 changed files with 4 additions and 3 deletions

View File

@ -40,7 +40,8 @@ class DataSourceError(Exception):
def __str__(self):
if self.root_exception:
self.message = "{} \"{}\"".format(self.message, self.root_exception)
return "{} \"{}\"".format(self.message, self.root_exception)
else:
return self.message