mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-16 16:02:33 +03:00
Try to fix <pre> issues on large lastbuilds
This commit is contained in:
parent
6cdf509c9e
commit
5d6baedbc9
2 changed files with 3 additions and 5 deletions
|
@ -962,10 +962,7 @@ def main():
|
||||||
if options.wiki and wikilog:
|
if options.wiki and wikilog:
|
||||||
try:
|
try:
|
||||||
newpage = site.Pages[app['id'] + '/lastbuild']
|
newpage = site.Pages[app['id'] + '/lastbuild']
|
||||||
txt = wikilog
|
txt = "Build completed at " + time.strftime("%Y-%m-%d %H:%M:%SZ", time.gmtime()) + "\n\n" + wikilog
|
||||||
if len(txt) > 8192:
|
|
||||||
txt = txt[-8192:]
|
|
||||||
txt = "Build completed at " + time.strftime("%Y-%m-%d %H:%M:%SZ", time.gmtime()) + "\n\n" + txt
|
|
||||||
newpage.save(txt, summary='Build log')
|
newpage.save(txt, summary='Build log')
|
||||||
except:
|
except:
|
||||||
logging.info("Error while attempting to publish build log")
|
logging.info("Error while attempting to publish build log")
|
||||||
|
|
|
@ -774,7 +774,8 @@ class BuildException(Exception):
|
||||||
if self.detail:
|
if self.detail:
|
||||||
ret += "=detail=\n"
|
ret += "=detail=\n"
|
||||||
ret += "<pre>\n"
|
ret += "<pre>\n"
|
||||||
ret += str(self.detail)
|
txt = self.detail[-8192:] if len(self.detail) > 8192 else self.detail
|
||||||
|
ret += str(txt)
|
||||||
ret += "</pre>\n"
|
ret += "</pre>\n"
|
||||||
return ret
|
return ret
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue