package: Proper string casting of PackageException

This commit is contained in:
Sunil Mohan Adapa 2016-02-12 13:43:15 +05:30
parent 1e8cc6f290
commit 20a97488d9
No known key found for this signature in database
GPG Key ID: 36C361440C9BC971

View File

@ -46,6 +46,11 @@ class PackageException(Exception):
self.error_string = error_string
self.error_details = error_details
def __str__(self):
"""Return the strin representation of the exception."""
return 'PackageException(error_string="{0}", error_details="{1}")' \
.format(self.error_string, self.error_details)
class Transaction(object):
"""Information about an ongoing transaction."""