mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-14 06:52:39 +03:00
Enhance BuildExceptions
This commit is contained in:
parent
c30dc5825e
commit
4cd621f939
1 changed files with 10 additions and 3 deletions
11
common.py
11
common.py
|
@ -384,11 +384,18 @@ def read_metadata(verbose=False):
|
||||||
return apps
|
return apps
|
||||||
|
|
||||||
class BuildException(Exception):
|
class BuildException(Exception):
|
||||||
def __init__(self, value):
|
def __init__(self, value, stdout = None, stderr = None):
|
||||||
self.value = value
|
self.value = value
|
||||||
|
self.stdout = stdout
|
||||||
|
self.stderr = stderr
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return repr(self.value)
|
ret = repr(self.value)
|
||||||
|
if self.stdout:
|
||||||
|
ret = ret + "\n==== stdout begin ====\n" + str(self.stdout) + "\n==== stdout end ===="
|
||||||
|
if self.stderr:
|
||||||
|
ret = ret + "\n==== stderr begin ====\n" + str(self.stderr) + "\n==== stderr end ===="
|
||||||
|
return ret
|
||||||
|
|
||||||
class VCSException(Exception):
|
class VCSException(Exception):
|
||||||
def __init__(self, value):
|
def __init__(self, value):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue