Available tests

This commit is contained in:
Jonathan Corwin 2012-07-05 00:13:19 +01:00
parent 1edfac99e6
commit ef29c0e97e

View File

@ -47,7 +47,6 @@ from songshowplusimport import SongShowPlusImport
from songproimport import SongProImport from songproimport import SongProImport
from foilpresenterimport import FoilPresenterImport from foilpresenterimport import FoilPresenterImport
from zionworximport import ZionWorxImport from zionworximport import ZionWorxImport
from mediashoutimport import MediaShoutImport
# Imports that might fail # Imports that might fail
log = logging.getLogger(__name__) log = logging.getLogger(__name__)
try: try:
@ -68,7 +67,13 @@ try:
except ImportError: except ImportError:
log.exception('Error importing %s', 'OooImport') log.exception('Error importing %s', 'OooImport')
HAS_OOO = False HAS_OOO = False
HAS_MEDIASHOUT = False
if os.name == u'nt':
try:
from mediashoutimport import MediaShoutImport
HAS_MEDIASHOUT = True
except ImportError:
log.exception('Error importing %s', 'MediaShoutImport')
class SongFormatSelect(object): class SongFormatSelect(object):
""" """
@ -242,9 +247,9 @@ class SongFormat(object):
'SongsPlugin.ImportWizardForm', 'Foilpresenter Song Files') 'SongsPlugin.ImportWizardForm', 'Foilpresenter Song Files')
}, },
MediaShout: { MediaShout: {
u'class': MediaShoutImport,
u'name': u'MediaShout', u'name': u'MediaShout',
u'prefix': u'mediaShout', u'prefix': u'mediaShout',
u'canDisable': True,
u'selectMode': SongFormatSelect.SingleFile, u'selectMode': SongFormatSelect.SingleFile,
u'filter': u'%s (*.mdb)' % translate('SongsPlugin.ImportWizardForm', u'filter': u'%s (*.mdb)' % translate('SongsPlugin.ImportWizardForm',
'MediaShout Database') 'MediaShout Database')
@ -392,5 +397,8 @@ if HAS_SOF:
SongFormat.set(SongFormat.Generic, u'availability', HAS_OOO) SongFormat.set(SongFormat.Generic, u'availability', HAS_OOO)
if HAS_OOO: if HAS_OOO:
SongFormat.set(SongFormat.Generic, u'class', OooImport) SongFormat.set(SongFormat.Generic, u'class', OooImport)
SongFormat.set(SongFormat.MediaShout, u'availability', HAS_MEDIASHOUT)
if HAS_MEDIASHOUT:
SongFormat.set(SongFormat.MediaShout, u'class', MediaShoutImport)
__all__ = [u'SongFormat', u'SongFormatSelect'] __all__ = [u'SongFormat', u'SongFormatSelect']