From a872d8688d027f35739f82f98027497297a25af8 Mon Sep 17 00:00:00 2001 From: Jochen Sprickerhof Date: Tue, 29 Mar 2022 15:28:31 +0200 Subject: [PATCH] Fix pylint warnings --- fdroidserver/apksigcopier.py | 1 + fdroidserver/build.py | 3 ++- fdroidserver/common.py | 1 + fdroidserver/exception.py | 2 ++ fdroidserver/tail.py | 1 + fdroidserver/update.py | 6 +++++- 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/fdroidserver/apksigcopier.py b/fdroidserver/apksigcopier.py index 122f8302..adc3e507 100644 --- a/fdroidserver/apksigcopier.py +++ b/fdroidserver/apksigcopier.py @@ -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__: diff --git a/fdroidserver/build.py b/fdroidserver/build.py index ec697398..d7cf8ca5 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -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 diff --git a/fdroidserver/common.py b/fdroidserver/common.py index c2394c06..a4679ff6 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -3257,6 +3257,7 @@ class ClonedZipInfo(zipfile.ZipInfo): """ def __init__(self, zinfo): + super().__init__() self.original = zinfo for k in self.__slots__: try: diff --git a/fdroidserver/exception.py b/fdroidserver/exception.py index 7e6e32ab..097f4f68 100644 --- a/fdroidserver/exception.py +++ b/fdroidserver/exception.py @@ -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): diff --git a/fdroidserver/tail.py b/fdroidserver/tail.py index d6e09691..8107f10d 100644 --- a/fdroidserver/tail.py +++ b/fdroidserver/tail.py @@ -105,6 +105,7 @@ class Tail(object): class TailError(Exception): def __init__(self, msg): + super().__init__() self.message = msg def __str__(self): diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 83154ec8..4db8a2cc 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -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: