Fix pylint warnings

This commit is contained in:
Jochen Sprickerhof 2022-03-29 15:28:31 +02:00
parent ff44488a42
commit a872d8688d
6 changed files with 12 additions and 2 deletions

View File

@ -99,6 +99,7 @@ class ReproducibleZipInfo(zipfile.ZipInfo):
_override = {} # type: Dict[str, Union[int, Tuple[int, ...]]]
def __init__(self, zinfo, **override):
super().__init__()
if override:
self._override = {**self._override, **override}
for k in self.__slots__:

View File

@ -48,6 +48,8 @@ try:
except ImportError:
pass
buildserverid = None
# Note that 'force' here also implies test mode.
def build_server(app, build, vcs, build_dir, output_dir, log_dir, force):
@ -951,7 +953,6 @@ def parse_commandline():
options = None
config = None
buildserverid = None
fdroidserverid = None
start_timestamp = time.gmtime()
status_output = None

View File

@ -3257,6 +3257,7 @@ class ClonedZipInfo(zipfile.ZipInfo):
"""
def __init__(self, zinfo):
super().__init__()
self.original = zinfo
for k in self.__slots__:
try:

View File

@ -1,5 +1,6 @@
class FDroidException(Exception):
def __init__(self, value=None, detail=None):
super().__init__()
self.value = value
self.detail = detail
@ -23,6 +24,7 @@ class FDroidException(Exception):
class MetaDataException(Exception):
def __init__(self, value):
super().__init__()
self.value = value
def __str__(self):

View File

@ -105,6 +105,7 @@ class Tail(object):
class TailError(Exception):
def __init__(self, msg):
super().__init__()
self.message = msg
def __str__(self):

View File

@ -2177,10 +2177,11 @@ def main():
apks += files
appid_has_apks = set()
appid_has_repo_files = set()
remove_apks = []
for apk in apks:
to_remove = get_apks_without_allowed_signatures(apps.get(apk['packageName']), apk)
if to_remove:
apks.remove(apk)
remove_apks.append(apk)
logging.warning(
_('"{path}" is signed by a key that is not allowed:').format(
path=to_remove
@ -2217,6 +2218,9 @@ def main():
else:
logging.warning(msg + '\n\t' + _('Use `fdroid update -c` to create it.'))
for apk in remove_apks:
apks.remove(apk)
mismatch_errors = ''
for appid in appid_has_apks:
if appid in appid_has_repo_files: