FDroidException handle Exceptions that return things other than str

This is related to a4c4a16ed9
This commit is contained in:
Hans-Christoph Steiner 2017-10-19 20:37:39 +02:00
parent af0d8ab84c
commit 7d4e354f25
2 changed files with 69 additions and 1 deletions

View file

@ -17,7 +17,10 @@ class FDroidException(Exception):
return ret
def __str__(self):
ret = self.value
if self.value is None:
ret = __name__
else:
ret = str(self.value)
if self.detail:
ret += "\n==== detail begin ====\n%s\n==== detail end ====" % ''.join(self.detail).strip()
return ret