mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-17 10:40:12 +02:00
Enhance BuildExceptions
This commit is contained in:
parent
c30dc5825e
commit
4cd621f939
13
common.py
13
common.py
@ -54,7 +54,7 @@ class vcs:
|
||||
|
||||
self.remote = remote
|
||||
self.local = local
|
||||
|
||||
|
||||
# Refresh the local repository - i.e. get the latest code. This
|
||||
# works either by updating if a local copy already exists, or by
|
||||
# cloning from scratch if it doesn't.
|
||||
@ -384,11 +384,18 @@ def read_metadata(verbose=False):
|
||||
return apps
|
||||
|
||||
class BuildException(Exception):
|
||||
def __init__(self, value):
|
||||
def __init__(self, value, stdout = None, stderr = None):
|
||||
self.value = value
|
||||
self.stdout = stdout
|
||||
self.stderr = stderr
|
||||
|
||||
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):
|
||||
def __init__(self, value):
|
||||
|
Loading…
Reference in New Issue
Block a user