mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-12 18:20:11 +01:00
Skip widget latest apps generator when data doesn't exist yet
This commit is contained in:
parent
c17bef6290
commit
388f997d37
@ -486,19 +486,20 @@ def main():
|
|||||||
knownapks.writeifchanged()
|
knownapks.writeifchanged()
|
||||||
|
|
||||||
# Generate latest apps data for widget
|
# Generate latest apps data for widget
|
||||||
data = ''
|
if os.path.exists(os.path.join('stats', 'latestapps.txt')):
|
||||||
for line in file(os.path.join('stats', 'latestapps.txt')):
|
data = ''
|
||||||
appid = line.rstrip()
|
for line in file(os.path.join('stats', 'latestapps.txt')):
|
||||||
data += appid + "\t"
|
appid = line.rstrip()
|
||||||
for app in apps:
|
data += appid + "\t"
|
||||||
if app['id'] == appid:
|
for app in apps:
|
||||||
data += app['Name'] + "\t"
|
if app['id'] == appid:
|
||||||
data += app['icon'] + "\t"
|
data += app['Name'] + "\t"
|
||||||
data += app['License'] + "\n"
|
data += app['icon'] + "\t"
|
||||||
break
|
data += app['License'] + "\n"
|
||||||
f = open('repo/latestapps.dat', 'w')
|
break
|
||||||
f.write(data)
|
f = open('repo/latestapps.dat', 'w')
|
||||||
f.close()
|
f.write(data)
|
||||||
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user