From b668e39296af6d8d8645bdabd0eb1a96291471f2 Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 6 Oct 2014 16:46:22 +0200 Subject: [PATCH] Don't load xmpp on Python 3 --- couchpotato/core/notifications/xmpp_.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/notifications/xmpp_.py b/couchpotato/core/notifications/xmpp_.py index f9916cd0..ab6717b6 100644 --- a/couchpotato/core/notifications/xmpp_.py +++ b/couchpotato/core/notifications/xmpp_.py @@ -3,12 +3,20 @@ import traceback from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification -import xmpp +from six import PY3 log = CPLog(__name__) -autoload = 'Xmpp' +try: + import xmpp + autoload = 'Xmpp' +except: + if PY3: + from couchpotato.core.helpers.py3 import NotSupported + raise NotSupported + else: + raise class Xmpp(Notification):