mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-17 10:40:12 +02:00
Fix for bb2cbd527b
This commit is contained in:
parent
bb2cbd527b
commit
cc017d70d2
@ -1099,16 +1099,16 @@ class FDroidException(Exception):
|
|||||||
self.value = value
|
self.value = value
|
||||||
self.detail = detail
|
self.detail = detail
|
||||||
|
|
||||||
def limit_size(detail):
|
def shortened_detail(self):
|
||||||
if len(detail) < 16000:
|
if len(self.detail) < 16000:
|
||||||
return detail
|
return self.detail
|
||||||
return '[...]\n' + detail[-16000:]
|
return '[...]\n' + self.detail[-16000:]
|
||||||
|
|
||||||
def get_wikitext(self):
|
def get_wikitext(self):
|
||||||
ret = repr(self.value) + "\n"
|
ret = repr(self.value) + "\n"
|
||||||
if self.detail:
|
if self.detail:
|
||||||
ret += "=detail=\n"
|
ret += "=detail=\n"
|
||||||
ret += "<pre>\n" + limit_size(self.detail) + "</pre>\n"
|
ret += "<pre>\n" + self.shortened_detail() + "</pre>\n"
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user