mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont assume utf-8 encoding for kdialog --help output
This commit is contained in:
parent
6a01e85159
commit
6b01b4a24a
@ -118,8 +118,8 @@ def run(cmd):
|
|||||||
def kdialog_supports_desktopfile():
|
def kdialog_supports_desktopfile():
|
||||||
ans = getattr(kdialog_supports_desktopfile, 'ans', None)
|
ans = getattr(kdialog_supports_desktopfile, 'ans', None)
|
||||||
if ans is None:
|
if ans is None:
|
||||||
raw = subprocess.check_output(['kdialog', '--help']).decode('utf-8')
|
raw = subprocess.check_output(['kdialog', '--help'])
|
||||||
ans = kdialog_supports_desktopfile.ans = '--desktopfile' in raw
|
ans = kdialog_supports_desktopfile.ans = b'--desktopfile' in raw
|
||||||
return ans
|
return ans
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user