Gracefully handle no network connection in update.py.

This commit is contained in:
Alex Dedul 2007-08-09 14:32:04 +00:00
parent 14ea39b353
commit 4f663d0229

View File

@ -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