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:
parent
8a99fb3da4
commit
d832bf8e9e
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user