1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-09 00:40:11 +01:00

Merge branch 'fix_check_updates_expected' into 'master'

[lint] Fix comparisons in check_updates_expected

See merge request fdroid/fdroidserver!1188
This commit is contained in:
Jochen Sprickerhof 2022-09-14 10:10:34 +00:00
commit 0a157d3f17

View File

@ -664,8 +664,10 @@ def check_current_version_code(app):
def check_updates_expected(app):
"""Check if update checking makes sense."""
if (app.get('NoSourceSince') or app.get('ArchivePolicy') == '0 versions') and (
app.get('AutoUpdateMode') or app.get('UpdateCheckMode')
if (
app.get('NoSourceSince') or app.get('ArchivePolicy') == '0 versions'
) and not all(
app.get(key, 'None') == 'None' for key in ('AutoUpdateMode', 'UpdateCheckMode')
):
yield _(
'App has NoSourceSince or ArchivePolicy "0 versions" but AutoUpateMode or UpdateCheck are not None'