From 4f663d022994b07a64c4063bd7e6d106f6331689 Mon Sep 17 00:00:00 2001 From: Alex Dedul Date: Thu, 9 Aug 2007 14:32:04 +0000 Subject: [PATCH] Gracefully handle no network connection in update.py. --- src/update.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/update.py b/src/update.py index af9643837..cbd2743ee 100644 --- a/src/update.py +++ b/src/update.py @@ -6,7 +6,12 @@ import sys import __init__ -new_release = urllib.urlopen("http://download.deluge-torrent.org/version").read().strip() +try: + new_release = urllib.urlopen("http://download.deluge-torrent.org/version").read().strip() +except IOError: + print "Network error while trying to check for a newer version of Deluge" + new_release = "" + if new_release > sys.argv[1]: import gtk import pygtk