mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-11 15:13:27 +02:00
Increase wiki error detail length limit
8k is too small, e.g. when make -jN errors or when there are a lot of scanner errors and warnings. 16k should be better. Also, use "[...]" to make it obvious that the output is truncated.
This commit is contained in:
parent
9c3fd97530
commit
bb2cbd527b
@ -1099,14 +1099,16 @@ class FDroidException(Exception):
|
||||
self.value = value
|
||||
self.detail = detail
|
||||
|
||||
def limit_size(detail):
|
||||
if len(detail) < 16000:
|
||||
return detail
|
||||
return '[...]\n' + detail[-16000:]
|
||||
|
||||
def get_wikitext(self):
|
||||
ret = repr(self.value) + "\n"
|
||||
if self.detail:
|
||||
ret += "=detail=\n"
|
||||
ret += "<pre>\n"
|
||||
txt = self.detail[-8192:] if len(self.detail) > 8192 else self.detail
|
||||
ret += str(txt)
|
||||
ret += "</pre>\n"
|
||||
ret += "<pre>\n" + limit_size(self.detail) + "</pre>\n"
|
||||
return ret
|
||||
|
||||
def __str__(self):
|
||||
|
Loading…
Reference in New Issue
Block a user