dabo Commit
Revision 4839
Date: 2008-12-15 18:34:18 -0800 (Mon, 15 Dec 2008)
Author: Ed
Trac: http://trac.dabodev.com/dabo/changeset/4839

Changed:
U   trunk/dabo/dApp.py

Log:
Fixed a bug that would crash Dabo if starting up with WebUpdate enabled and no 
network connection. Thanks to Adrian Klaver for pointing this out.



Diff:
Modified: trunk/dabo/dApp.py
===================================================================
--- trunk/dabo/dApp.py  2008-12-15 20:39:25 UTC (rev 4838)
+++ trunk/dabo/dApp.py  2008-12-16 02:34:18 UTC (rev 4839)
@@ -556,10 +556,15 @@
                                        url = 
"http://dabodev.com/frameworkVersions/latest?project=%s"; % abbrev
                                        try:
                                                vers = 
int(urllib2.urlopen(url).read())
+                                       except urllib2.URLError:
+                                               # Could not connect
+                                               dabo.errorLog.write(_("Could 
not connect to the Dabo servers"))
+                                               return (None, None)
                                        except ValueError:
                                                vers = -1
                                        except StandardError, e:
                                                dabo.errorLog.write(_("Failed 
to open URL '%(url)s'. Error: %(e)s") % locals())
+                                               return (None, None)
                                        localVers = 
self._currentUpdateVersion(nm)
                                        retAvailable = (localVers < vers)
                                prf.setValue("last_check", now)




_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: 
http://leafe.com/archives/byMID/[email protected]

Reply via email to