Fix #963894: expect also OSError while checking for media backends.

This commit is contained in:
Martin Zibricky 2012-09-15 13:09:59 +02:00
parent 20bfde8e5a
commit f51f19e2b9

View File

@ -114,7 +114,9 @@ class MediaController(object):
log.debug(u'Importing controller %s', modulename) log.debug(u'Importing controller %s', modulename)
try: try:
__import__(modulename, globals(), locals(), []) __import__(modulename, globals(), locals(), [])
except ImportError: # On some platforms importing vlc.py might cause
# also OSError exception. (e.g. Mac OS X)
except (ImportError, OSError):
log.warn(u'Failed to import %s on path %s', log.warn(u'Failed to import %s on path %s',
modulename, path) modulename, path)
controller_classes = MediaPlayer.__subclasses__() controller_classes = MediaPlayer.__subclasses__()