From c7ce20a3b9ca0866abbbd1db59ec323f1c524c0d Mon Sep 17 00:00:00 2001 From: j Date: Tue, 5 Apr 2016 01:21:43 +0200 Subject: [PATCH] dont fail with old downloads --- oml/downloads.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/oml/downloads.py b/oml/downloads.py index 66b6b05..22c9d25 100644 --- a/oml/downloads.py +++ b/oml/downloads.py @@ -41,7 +41,10 @@ class Downloads(Thread): import item.models self.download_updates() 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: if state.shutdown: return False