mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix #1950206 [Calibre missing private copy of kdialog on Fedora 35](https://bugs.launchpad.net/calibre/+bug/1950206)
This commit is contained in:
parent
4d4f55a95d
commit
18dcc8734c
@ -122,9 +122,11 @@ def run(cmd):
|
||||
def kdialog_supports_desktopfile():
|
||||
ans = getattr(kdialog_supports_desktopfile, 'ans', None)
|
||||
if ans is None:
|
||||
from calibre.gui2 import sanitize_env_vars
|
||||
try:
|
||||
raw = subprocess.check_output(['kdialog', '--help'])
|
||||
except OSError:
|
||||
with sanitize_env_vars():
|
||||
raw = subprocess.check_output(['kdialog', '--help'])
|
||||
except (subprocess.CalledProcessError, FileNotFoundError, OSError):
|
||||
raw = b'--desktopfile'
|
||||
ans = kdialog_supports_desktopfile.ans = b'--desktopfile' in raw
|
||||
return ans
|
||||
|
Loading…
x
Reference in New Issue
Block a user