Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
vlc: catch errors when instanciating vlc in is_available
This would make the tests fail on a system without VLC installed. Detecting it in is_available skips the tests. For reference this is the error I get: ``` Traceback (most recent call last): File "/home/odrling/git/misc/dakara-player/src/dakara_player/media_player/vlc.py", line 94, in is_available return vlc is not None and vlc.Instance() is not None ^^^^^^^^^^^^^^ File "/home/odrling/git/misc/dakara-player/.direnv/python-3.12/lib/python3.12/site-packages/vlc.py", line 1838, in __new__ return libvlc_new(len(args), args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/odrling/git/misc/dakara-player/.direnv/python-3.12/lib/python3.12/site-packages/vlc.py", line 5014, in libvlc_new _Cfunction('libvlc_new', ((1,), (1,),), class_result(Instance), File "/home/odrling/git/misc/dakara-player/.direnv/python-3.12/lib/python3.12/site-packages/vlc.py", line 302, in _Cfunction raise NameError('no function %r' % (name,)) NameError: no function 'libvlc_new' ```
- Loading branch information