From 98edf16de16362b75b707b50c3845250a9817237 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 May 2012 16:59:18 +0530 Subject: [PATCH] Dont print a full traceback when failing to check for updates --- src/calibre/gui2/update.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/calibre/gui2/update.py b/src/calibre/gui2/update.py index 526a0bc56e..60df21dcf3 100644 --- a/src/calibre/gui2/update.py +++ b/src/calibre/gui2/update.py @@ -9,7 +9,7 @@ import mechanize from calibre.constants import (__appname__, __version__, iswindows, isosx, isportable) -from calibre import browser +from calibre import browser, prints, as_unicode from calibre.utils.config import prefs from calibre.gui2 import config, dynamic, open_url from calibre.gui2.dialogs.plugin_updater import get_plugin_updates_available @@ -45,14 +45,14 @@ class CheckForUpdates(QThread): version = get_newest_version() if version and version != __version__ and len(version) < 10: calibre_update_version = version - except: - traceback.print_exc() + except Exception as e: + prints('Failed to check for calibre update:', as_unicode(e)) try: update_plugins = get_plugin_updates_available() if update_plugins is not None: plugins_update_found = len(update_plugins) - except: - traceback.print_exc() + except Exception as e: + prints('Failed to check for plugin update:', as_unicode(e)) if (calibre_update_version != NO_CALIBRE_UPDATE or plugins_update_found > 0): self.update_found.emit('%s%s%d'%(calibre_update_version,