forked from openlp/openlp
Fix traceback on linux when VLC isn't installed. Fixes bug 1489143.
Fixes: https://launchpad.net/bugs/1489143
This commit is contained in:
parent
f36a9c29dc
commit
f98c35df94
@ -80,10 +80,8 @@ def get_vlc():
|
|||||||
if is_win():
|
if is_win():
|
||||||
if not isinstance(e, WindowsError) and e.winerror != 126:
|
if not isinstance(e, WindowsError) and e.winerror != 126:
|
||||||
raise
|
raise
|
||||||
elif is_macosx():
|
|
||||||
pass
|
|
||||||
else:
|
else:
|
||||||
raise
|
pass
|
||||||
if is_vlc_available:
|
if is_vlc_available:
|
||||||
try:
|
try:
|
||||||
VERSION = vlc.libvlc_get_version().decode('UTF-8')
|
VERSION = vlc.libvlc_get_version().decode('UTF-8')
|
||||||
@ -103,7 +101,7 @@ def get_vlc():
|
|||||||
# On linux we need to initialise X threads, but not when running tests.
|
# On linux we need to initialise X threads, but not when running tests.
|
||||||
# This needs to happen on module load and not in get_vlc(), otherwise it can cause crashes on some DE on some setups
|
# This needs to happen on module load and not in get_vlc(), otherwise it can cause crashes on some DE on some setups
|
||||||
# (reported on Gnome3, Unity, Cinnamon, all GTK+ based) when using native filedialogs...
|
# (reported on Gnome3, Unity, Cinnamon, all GTK+ based) when using native filedialogs...
|
||||||
if get_vlc() and is_linux() and 'nose' not in sys.argv[0]:
|
if is_linux() and 'nose' not in sys.argv[0] and get_vlc():
|
||||||
import ctypes
|
import ctypes
|
||||||
try:
|
try:
|
||||||
x11 = ctypes.cdll.LoadLibrary('libX11.so')
|
x11 = ctypes.cdll.LoadLibrary('libX11.so')
|
||||||
|
Loading…
Reference in New Issue
Block a user