plugins: added new MissingModule exceptions to plugins using third party modules
This commit is contained in:
parent
72b108f3a2
commit
969af13f59
6 changed files with 29 additions and 11 deletions
|
|
@ -24,8 +24,11 @@ log = getLogger(__name__)
|
|||
from sat.core import exceptions
|
||||
from twisted.internet import defer
|
||||
from wokkel import data_form
|
||||
from lxml import etree
|
||||
from os import path
|
||||
try:
|
||||
from lxml import etree
|
||||
except ImportError:
|
||||
raise exceptions.MissingModule(u"Missing module lxml, please download/install it from http://lxml.de/")
|
||||
import os.path
|
||||
import uuid
|
||||
import dbus
|
||||
from dbus.mainloop.glib import DBusGMainLoop
|
||||
|
|
|
|||
|
|
@ -29,10 +29,13 @@ import os.path
|
|||
import copy
|
||||
import time
|
||||
from os import unlink
|
||||
from mutagen.oggvorbis import OggVorbis, OggVorbisHeaderError
|
||||
from mutagen.mp3 import MP3, HeaderNotFoundError
|
||||
from mutagen.easyid3 import EasyID3
|
||||
from mutagen.id3 import ID3NoHeaderError
|
||||
try:
|
||||
from mutagen.oggvorbis import OggVorbis, OggVorbisHeaderError
|
||||
from mutagen.mp3 import MP3, HeaderNotFoundError
|
||||
from mutagen.easyid3 import EasyID3
|
||||
from mutagen.id3 import ID3NoHeaderError
|
||||
except ImportError:
|
||||
raise exceptions.MissingModule(u"Missing module Mutagen, please download/install from https://bitbucket.org/lazka/mutagen")
|
||||
|
||||
|
||||
NC_RADIOCOL = 'http://www.goffi.org/protocol/radiocol'
|
||||
|
|
|
|||
|
|
@ -24,8 +24,11 @@ log = getLogger(__name__)
|
|||
from twisted.internet import defer
|
||||
from twisted.internet.threads import deferToThread
|
||||
from sat.core import exceptions
|
||||
from lxml import html
|
||||
from lxml.html import clean
|
||||
try:
|
||||
from lxml import html
|
||||
from lxml.html import clean
|
||||
except ImportError:
|
||||
raise exceptions.MissingModule(u"Missing module lxml, please download/install it from http://lxml.de/")
|
||||
from cgi import escape
|
||||
import re
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,10 @@ from base64 import b64decode, b64encode
|
|||
from hashlib import sha1
|
||||
from sat.core import exceptions
|
||||
from sat.memory import persistent
|
||||
from PIL import Image
|
||||
try:
|
||||
from PIL import Image
|
||||
except:
|
||||
raise exceptions.MissingModule(u"Missing module pillow, please download/install it from https://python-pillow.github.io")
|
||||
from cStringIO import StringIO
|
||||
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -25,7 +25,10 @@ log = getLogger(__name__)
|
|||
from wokkel import disco, iwokkel
|
||||
from zope.interface import implements
|
||||
# from lxml import etree
|
||||
from lxml import html
|
||||
try:
|
||||
from lxml import html
|
||||
except ImportError:
|
||||
raise exceptions.MissingModule(u"Missing module lxml, please download/install it from http://lxml.de/")
|
||||
try:
|
||||
from twisted.words.protocols.xmlstream import XMPPHandler
|
||||
except ImportError:
|
||||
|
|
|
|||
|
|
@ -31,7 +31,10 @@ from sat.tools import sat_defer
|
|||
|
||||
# XXX: tmp.pubsub is actually use instead of wokkel version
|
||||
from wokkel import pubsub
|
||||
from feed.date import rfc3339
|
||||
try:
|
||||
from feed.date import rfc3339
|
||||
except ImportError:
|
||||
raise exceptions.MissingModule(u"Missing module pyfeed, please download/install it from http://home.avvanta.com/~steveha/pyfeed.html")
|
||||
import uuid
|
||||
import time
|
||||
import urlparse
|
||||
|
|
|
|||
Loading…
Reference in a new issue