1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-13 02:30:11 +01:00

Better build log formatting for wiki

This commit is contained in:
Ciaran Gultnieks 2013-05-20 21:19:53 +01:00
parent 8a99fb3da4
commit d832bf8e9e
2 changed files with 15 additions and 1 deletions

View File

@ -677,7 +677,7 @@ def main():
if options.stop:
sys.exit(1)
failed_apps[app['id']] = be
wikilog = str(be)
wikilog = be.get_wikitext()
except VCSException as vcse:
print "VCS error while building app %s: %s" % (app['id'], vcse)
if options.stop:

View File

@ -886,6 +886,20 @@ class BuildException(Exception):
self.stdout = stdout
self.stderr = stderr
def get_wikitext(self):
ret = repr(self.value) + "\n"
if self.stdout:
ret += "=stdout=\n"
ret += "<pre>\n"
ret += str(self.stdout)
ret += "</pre>\n"
if self.stderr:
ret += "=stderr=\n"
ret += "<pre>\n"
ret += str(self.stderr)
ret += "</pre>\n"
return ret
def __str__(self):
ret = repr(self.value)
if self.stdout: