From da3055be306e9b15cf31cd1e66de4c72b4f6db17 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 3 Dec 2012 14:29:59 +0100 Subject: [PATCH] Return nothing on disabled calls. --- couchpotato/core/plugins/base.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/plugins/base.py b/couchpotato/core/plugins/base.py index 1e430181..fc2bfdb1 100644 --- a/couchpotato/core/plugins/base.py +++ b/couchpotato/core/plugins/base.py @@ -114,8 +114,11 @@ class Plugin(object): # Don't try for failed requests if self.http_failed_disabled.get(host, 0) > 0: if self.http_failed_disabled[host] > (time.time() - 900): - log.info('Disabled calls to %s for 15 minutes because so many failed requests.', host) - raise Exception + log.info2('Disabled calls to %s for 15 minutes because so many failed requests.', host) + if not show_error: + raise + else: + return '' else: del self.http_failed_request[host] del self.http_failed_disabled[host]