Browse Source

Don't error out if XBMC is turned off. fix #3515

pull/3176/merge
Ruud 11 years ago
parent
commit
61a9037835
  1. 4
      couchpotato/core/notifications/xbmc.py

4
couchpotato/core/notifications/xbmc.py

@ -8,7 +8,7 @@ from couchpotato.core.helpers.variable import splitString, getTitle
from couchpotato.core.logger import CPLog from couchpotato.core.logger import CPLog
from couchpotato.core.notifications.base import Notification from couchpotato.core.notifications.base import Notification
import requests import requests
from requests.packages.urllib3.exceptions import MaxRetryError from requests.packages.urllib3.exceptions import MaxRetryError, ConnectionError
log = CPLog(__name__) log = CPLog(__name__)
@ -172,7 +172,7 @@ class XBMC(Notification):
# manually fake expected response array # manually fake expected response array
return [{'result': 'Error'}] return [{'result': 'Error'}]
except (MaxRetryError, requests.exceptions.Timeout): except (MaxRetryError, requests.exceptions.Timeout, ConnectionError):
log.info2('Couldn\'t send request to XBMC, assuming it\'s turned off') log.info2('Couldn\'t send request to XBMC, assuming it\'s turned off')
return [{'result': 'Error'}] return [{'result': 'Error'}]
except: except:

Loading…
Cancel
Save