From ec28018c6140fc8781fe58b0f92147ddcd492a64 Mon Sep 17 00:00:00 2001 From: sfaulds Date: Fri, 18 Nov 2016 13:42:46 +1100 Subject: [PATCH] consume read time oout errors wrap fix in try/except --- resources/lib/database.py | 6 +++++- resources/lib/downloadutils.py | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/resources/lib/database.py b/resources/lib/database.py index da417e2f..8d92bdc7 100644 --- a/resources/lib/database.py +++ b/resources/lib/database.py @@ -233,5 +233,9 @@ def db_reset(): dialog.ok(heading=language(29999), line1=language(33088)) xbmc.executebuiltin('RestartApp') - #return xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xbmcgui.ListItem()) + try: + xbmcplugin.setResolvedUrl(int(sys.argv[1]), False, xbmcgui.ListItem()) + except: + pass + \ No newline at end of file diff --git a/resources/lib/downloadutils.py b/resources/lib/downloadutils.py index 54c35ddf..b86bdf88 100644 --- a/resources/lib/downloadutils.py +++ b/resources/lib/downloadutils.py @@ -275,7 +275,11 @@ class DownloadUtils(object): raise internal_exceptions.ExceptionWrapper(error) except requests.exceptions.ConnectTimeout as error: - log.error("Server timeout at: %s", url) + log.error("ConnectTimeout at: %s", url) + raise internal_exceptions.ExceptionWrapper(error) + + except requests.exceptions.ReadTimeout as error: + log.error("ReadTimeout at: %s", url) raise internal_exceptions.ExceptionWrapper(error) except requests.exceptions.ConnectionError as error: