From 36e5fec418ac823dd4ed6cc780c2a8f1570e4275 Mon Sep 17 00:00:00 2001 From: Marcus Hoffmann Date: Mon, 14 Sep 2020 16:22:09 +0200 Subject: [PATCH] remove unused latestapps.dat code latestapps.dat was being used for the old-website, it's not used anymore Fixes the following crash in production: ``` 2020-09-13 19:26:59,000 CRITICAL: Unknown exception found! Traceback (most recent call last): File "/home/fbuild/fdroidserver/fdroid", line 22, in fdroidserver.__main__.main() File "/home/fbuild/fdroidserver/fdroidserver/__main__.py", line 230, in main raise e File "/home/fbuild/fdroidserver/fdroidserver/__main__.py", line 211, in main mod.main() File "/home/fbuild/fdroidserver/fdroidserver/update.py", line 2451, in main app = apps[appid] KeyError: '45b464b398a7d9fac5a186bd3d3d8dc1e6a25f7f9cd48c7462619b1e5fba87c2' ``` --- fdroidserver/update.py | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/fdroidserver/update.py b/fdroidserver/update.py index 1ddbd8e8..5936e502 100644 --- a/fdroidserver/update.py +++ b/fdroidserver/update.py @@ -2438,21 +2438,6 @@ def main(): # Update known apks info... knownapks.writeifchanged() - # Generate latest apps data for widget - if os.path.exists(os.path.join('stats', 'latestapps.txt')): - data = '' - with open(os.path.join('stats', 'latestapps.txt'), 'r') as f: - for line in f: - appid = line.rstrip() - data += appid + "\t" - app = apps[appid] - data += app.Name + "\t" - if app.icon is not None: - data += app.icon + "\t" - data += app.License + "\n" - with open(os.path.join(repodirs[0], 'latestapps.dat'), 'w') as f: - f.write(data) - if cachechanged: write_cache(apkcache)