/usr/lib/python3/dist-packages/fdroidserver/exception.py is in fdroidserver 1.0.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | class FDroidException(Exception):
def __init__(self, value=None, detail=None):
self.value = value
self.detail = detail
def shortened_detail(self):
if len(self.detail) < 16000:
return self.detail
return '[...]\n' + self.detail[-16000:]
def get_wikitext(self):
ret = repr(self.value) + "\n"
if self.detail:
ret += "=detail=\n"
ret += "<pre>\n" + self.shortened_detail() + "</pre>\n"
return ret
def __str__(self):
if self.value is None:
ret = __name__
else:
ret = str(self.value)
if self.detail:
ret += "\n==== detail begin ====\n%s\n==== detail end ====" % ''.join(self.detail).strip()
return ret
class MetaDataException(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return self.value
class VCSException(FDroidException):
pass
class NoSubmodulesException(VCSException):
pass
class BuildException(FDroidException):
pass
class VerificationException(FDroidException):
pass
|