mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-10-08 18:31:07 +03:00
Make pre-commit hook pass after python3 switch
This commit is contained in:
parent
49ac25270e
commit
ee9a296b64
7 changed files with 18 additions and 17 deletions
|
@ -1337,14 +1337,15 @@ def main():
|
|||
# Generate latest apps data for widget
|
||||
if os.path.exists(os.path.join('stats', 'latestapps.txt')):
|
||||
data = ''
|
||||
for line in file(os.path.join('stats', 'latestapps.txt')):
|
||||
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('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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue