mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-09 08:43:10 +02: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
1 changed files with 4 additions and 0 deletions
|
|
@ -27,6 +27,10 @@ def get_newest_version():
|
|||
'win' if iswindows else 'osx' if isosx else 'oth')
|
||||
req.add_header('CALIBRE_INSTALL_UUID', prefs['installation_uuid'])
|
||||
version = br.open(req).read().strip()
|
||||
try:
|
||||
version = version.decode('utf-8')
|
||||
except UnicodeDecodeError:
|
||||
version = u''
|
||||
return version
|
||||
|
||||
class CheckForUpdates(QThread):
|
||||
|
|
|
|||
Loading…
Reference in a new issue