mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont print a full traceback when failing to check for updates
This commit is contained in:
parent
3b1921fca4
commit
98edf16de1
@ -9,7 +9,7 @@ import mechanize
|
|||||||
|
|
||||||
from calibre.constants import (__appname__, __version__, iswindows, isosx,
|
from calibre.constants import (__appname__, __version__, iswindows, isosx,
|
||||||
isportable)
|
isportable)
|
||||||
from calibre import browser
|
from calibre import browser, prints, as_unicode
|
||||||
from calibre.utils.config import prefs
|
from calibre.utils.config import prefs
|
||||||
from calibre.gui2 import config, dynamic, open_url
|
from calibre.gui2 import config, dynamic, open_url
|
||||||
from calibre.gui2.dialogs.plugin_updater import get_plugin_updates_available
|
from calibre.gui2.dialogs.plugin_updater import get_plugin_updates_available
|
||||||
@ -45,14 +45,14 @@ class CheckForUpdates(QThread):
|
|||||||
version = get_newest_version()
|
version = get_newest_version()
|
||||||
if version and version != __version__ and len(version) < 10:
|
if version and version != __version__ and len(version) < 10:
|
||||||
calibre_update_version = version
|
calibre_update_version = version
|
||||||
except:
|
except Exception as e:
|
||||||
traceback.print_exc()
|
prints('Failed to check for calibre update:', as_unicode(e))
|
||||||
try:
|
try:
|
||||||
update_plugins = get_plugin_updates_available()
|
update_plugins = get_plugin_updates_available()
|
||||||
if update_plugins is not None:
|
if update_plugins is not None:
|
||||||
plugins_update_found = len(update_plugins)
|
plugins_update_found = len(update_plugins)
|
||||||
except:
|
except Exception as e:
|
||||||
traceback.print_exc()
|
prints('Failed to check for plugin update:', as_unicode(e))
|
||||||
if (calibre_update_version != NO_CALIBRE_UPDATE or
|
if (calibre_update_version != NO_CALIBRE_UPDATE or
|
||||||
plugins_update_found > 0):
|
plugins_update_found > 0):
|
||||||
self.update_found.emit('%s%s%d'%(calibre_update_version,
|
self.update_found.emit('%s%s%d'%(calibre_update_version,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user