dont fail with old downloads

This commit is contained in:
j 2016-04-05 01:21:43 +02:00
parent f16ac0e3c1
commit c7ce20a3b9

View file

@ -41,7 +41,10 @@ class Downloads(Thread):
import item.models import item.models
self.download_updates() self.download_updates()
downloads = list(self.transfers.items()) downloads = list(self.transfers.items())
downloads.sort(key=lambda t: t[1].get('added')) try:
downloads.sort(key=lambda t: t[1].get('added'))
except:
pass
for itemid, t in downloads: for itemid, t in downloads:
if state.shutdown: if state.shutdown:
return False return False