mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 23:12:46 +03:00
FDroidException handle Exceptions that return things other than str
This is related to a4c4a16ed9
This commit is contained in:
parent
af0d8ab84c
commit
7d4e354f25
2 changed files with 69 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue