Try to fix <pre> issues on large lastbuilds

This commit is contained in:
Daniel Martí 2014-03-17 14:52:01 +01:00
parent 6cdf509c9e
commit 5d6baedbc9
2 changed files with 3 additions and 5 deletions

View file

@ -962,10 +962,7 @@ def main():
if options.wiki and wikilog:
try:
newpage = site.Pages[app['id'] + '/lastbuild']
txt = 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
txt = "Build completed at " + time.strftime("%Y-%m-%d %H:%M:%SZ", time.gmtime()) + "\n\n" + wikilog
newpage.save(txt, summary='Build log')
except:
logging.info("Error while attempting to publish build log")