From f98c35df94676696cca714cb3aae38e7c687eed4 Mon Sep 17 00:00:00 2001 From: Tomas Groth Date: Wed, 26 Aug 2015 22:37:23 +0100 Subject: [PATCH] Fix traceback on linux when VLC isn't installed. Fixes bug 1489143. Fixes: https://launchpad.net/bugs/1489143 --- openlp/core/ui/media/vlcplayer.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/openlp/core/ui/media/vlcplayer.py b/openlp/core/ui/media/vlcplayer.py index 56f2b976c..784e0ffca 100644 --- a/openlp/core/ui/media/vlcplayer.py +++ b/openlp/core/ui/media/vlcplayer.py @@ -80,10 +80,8 @@ def get_vlc(): if is_win(): if not isinstance(e, WindowsError) and e.winerror != 126: raise - elif is_macosx(): - pass else: - raise + pass if is_vlc_available: try: 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. # 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... -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 try: x11 = ctypes.cdll.LoadLibrary('libX11.so')