diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-07-30 13:09:01 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-07-30 13:09:01 (GMT) |
commit | ba5e3911d68a403be0088fe96a2549c2e85b932e (patch) | |
tree | 019ec8b2355620385b0670a1c4a5e37af64d6e76 /extensions | |
parent | c53240374b795ac4ea70fc506987b215ad016569 (diff) |
Do not fail on net errors
Diffstat (limited to 'extensions')
-rwxr-xr-x | extensions/cpsection/updater/model.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/extensions/cpsection/updater/model.py b/extensions/cpsection/updater/model.py index 4382ff1..bf0249e 100755 --- a/extensions/cpsection/updater/model.py +++ b/extensions/cpsection/updater/model.py @@ -134,7 +134,7 @@ class UpdateList(gtk.ListStore): try: new_version, new_url, new_size = aslo.fetch_update_info(row[BUNDLE]) - except Exceptoin, e: + except Exception, e: logging.warning('Failure %s updating: %s' % \ (row[BUNDLE].get_name(), e)) return False @@ -142,7 +142,7 @@ class UpdateList(gtk.ListStore): row[CURRENT_VERSION] = row[BUNDLE].get_activity_version() row[UPDATE_VERSION] = long(new_version) - if row[CURRENT_VERSION] > row[UPDATE_VERSION]: + if row[CURRENT_VERSION] >= row[UPDATE_VERSION]: logging.debug('Skip %s update' % row[BUNDLE].get_name()) return False @@ -184,7 +184,11 @@ class UpdateList(gtk.ListStore): fd, xofile = tempfile.mkstemp(suffix='.xo') os.close(fd) try: - urllib.urlretrieve(row[UPDATE_URL], xofile) + try: + urllib.urlretrieve(row[UPDATE_URL], xofile) + except Exception, e: + logging.warning("Can't download %s" % row[UPDATE_URL]) + continue if self._cancel: return installed |