mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Don't popup an error dialog if the user's network returns a non utf-8 string when checking for the latest version
This commit is contained in:
parent
0dcf9a9482
commit
5cbed9ff4c
@ -27,6 +27,10 @@ def get_newest_version():
|
|||||||
'win' if iswindows else 'osx' if isosx else 'oth')
|
'win' if iswindows else 'osx' if isosx else 'oth')
|
||||||
req.add_header('CALIBRE_INSTALL_UUID', prefs['installation_uuid'])
|
req.add_header('CALIBRE_INSTALL_UUID', prefs['installation_uuid'])
|
||||||
version = br.open(req).read().strip()
|
version = br.open(req).read().strip()
|
||||||
|
try:
|
||||||
|
version = version.decode('utf-8')
|
||||||
|
except UnicodeDecodeError:
|
||||||
|
version = u''
|
||||||
return version
|
return version
|
||||||
|
|
||||||
class CheckForUpdates(QThread):
|
class CheckForUpdates(QThread):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user