summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Bruhin <me@the-compiler.org>2021-04-06 20:41:11 +0200
committerFlorian Bruhin <me@the-compiler.org>2021-04-06 20:41:11 +0200
commit85a41de4b54cf3da6ab8c0d41222b76836238536 (patch)
tree1efa0c0e94702ab754d41067b2fffd12b9c80002
parent05660ae429e4b3059185f0c597b155d41afc3067 (diff)
parent630599daa011528b5e877d1a21f746cdf5fc3d83 (diff)
downloadqutebrowser-85a41de4b54cf3da6ab8c0d41222b76836238536.tar.gz
qutebrowser-85a41de4b54cf3da6ab8c0d41222b76836238536.zip
Merge remote-tracking branch 'origin/pr/6364'
-rw-r--r--qutebrowser/misc/elf.py18
1 files changed, 5 insertions, 13 deletions
diff --git a/qutebrowser/misc/elf.py b/qutebrowser/misc/elf.py
index 3bfd111fa..307d3b4ac 100644
--- a/qutebrowser/misc/elf.py
+++ b/qutebrowser/misc/elf.py
@@ -316,21 +316,13 @@ def parse_webenginecore() -> Optional[Versions]:
else:
library_path = pathlib.Path(QLibraryInfo.location(QLibraryInfo.LibrariesPath))
- filenames = [
- # PyQt bundles those files with a .5 suffix, and Linux distributions
- # most likely symlinks that.
- 'libQt5WebEngineCore.so.5',
- # OpenBSD
- 'libQt5WebEngineCore.so.1.0',
- ]
- for filename in filenames:
- lib_file = library_path / filename
- if lib_file.exists():
- log.misc.debug(f"QtWebEngine .so found at {lib_file}")
- break
- else:
+ library_name = sorted(library_path.glob('libQt5WebEngineCore.so*'))
+ if not library_name:
log.misc.debug(f"No QtWebEngine .so found in {library_path}")
return None
+ else:
+ lib_file = library_name[-1]
+ log.misc.debug(f"QtWebEngine .so found at {lib_file}")
try:
with lib_file.open('rb') as f: