From: Hans-Christoph Steiner Date: Thu, 13 Oct 2016 15:28:54 +0000 (+0200) Subject: remove unused 'apps' argument from update.scan_apks() X-Git-Tag: 0.8~150^2~3 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=47d9fd330d0d1a0344465c2c8be1048ee76b3784;p=fdroidserver.git remove unused 'apps' argument from update.scan_apks() --- diff --git a/fdroidserver/update.py b/fdroidserver/update.py index d18f0fd3..a93d982e 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -504,12 +504,11 @@ def insert_obbs(repodir, apps, apks): break -def scan_apks(apps, apkcache, repodir, knownapks, use_date_from_apk=False): +def scan_apks(apkcache, repodir, knownapks, use_date_from_apk=False): """Scan the apks in the given repo directory. This also extracts the icons. - :param apps: list of all applications, as per metadata.read_metadata :param apkcache: current apk cache information :param repodir: repo directory to scan :param knownapks: known apks info @@ -1394,7 +1393,7 @@ def main(): delete_disabled_builds(apps, apkcache, repodirs) # Scan all apks in the main repo - apks, cachechanged = scan_apks(apps, apkcache, repodirs[0], knownapks, options.use_date_from_apk) + apks, cachechanged = scan_apks(apkcache, repodirs[0], knownapks, options.use_date_from_apk) # Generate warnings for apk's with no metadata (or create skeleton # metadata files, if requested on the command line) @@ -1438,7 +1437,7 @@ def main(): # Scan the archive repo for apks as well if len(repodirs) > 1: - archapks, cc = scan_apks(apps, apkcache, repodirs[1], knownapks, options.use_date_from_apk) + archapks, cc = scan_apks(apkcache, repodirs[1], knownapks, options.use_date_from_apk) if cc: cachechanged = True else: diff --git a/tests/update.TestCase b/tests/update.TestCase index e2927932..25e59a83 100755 --- a/tests/update.TestCase +++ b/tests/update.TestCase @@ -101,7 +101,7 @@ class UpdateTest(unittest.TestCase): apps = fdroidserver.metadata.read_metadata(xref=True) knownapks = fdroidserver.common.KnownApks() - apks, cachechanged = fdroidserver.update.scan_apks(apps, {}, 'repo', knownapks, False) + apks, cachechanged = fdroidserver.update.scan_apks({}, 'repo', knownapks, False) self.assertEqual(len(apks), 6) apk = apks[0] self.assertEqual(apk['minSdkVersion'], '4')