Don't load unsupported modules
This commit is contained in:
@@ -3,6 +3,7 @@ import sys
|
|||||||
import traceback
|
import traceback
|
||||||
|
|
||||||
from couchpotato.core.event import fireEvent
|
from couchpotato.core.event import fireEvent
|
||||||
|
from couchpotato.core.helpers.py3 import NotSupported
|
||||||
from couchpotato.core.logger import CPLog
|
from couchpotato.core.logger import CPLog
|
||||||
from importhelper import import_module
|
from importhelper import import_module
|
||||||
import six
|
import six
|
||||||
@@ -162,6 +163,8 @@ class Loader(object):
|
|||||||
def loadModule(self, name):
|
def loadModule(self, name):
|
||||||
try:
|
try:
|
||||||
return import_module(name)
|
return import_module(name)
|
||||||
|
except NotSupported:
|
||||||
|
log.error('Module "%s" is not supported in Python 3', name)
|
||||||
except ImportError:
|
except ImportError:
|
||||||
log.debug('Skip loading module plugin %s: %s', (name, traceback.format_exc()))
|
log.debug('Skip loading module plugin %s: %s', (name, traceback.format_exc()))
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user