dabo Commit
Revision 4704
Date: 2008-11-23 06:23:24 -0800 (Sun, 23 Nov 2008)
Author: Ed
Trac: http://svn.dabodev.com/trac/dabo/changeset/4704

Changed:
U   trunk/dabo/lib/RemoteConnector.py

Log:
Added better handling of the case where a remote app is being launched and the 
remote server is not responding.


Diff:
Modified: trunk/dabo/lib/RemoteConnector.py
===================================================================
--- trunk/dabo/lib/RemoteConnector.py   2008-11-23 14:21:56 UTC (rev 4703)
+++ trunk/dabo/lib/RemoteConnector.py   2008-11-23 14:23:24 UTC (rev 4704)
@@ -171,8 +171,12 @@
                listURL = "%s://%s/manifest" % (scheme, host)
                try:
                        res = jsonDecode(self._read(listURL))
+               except urllib2.URLError, e:
+                       code, msg = e.reason
+                       if code == 61:
+                               # Connection refused; server's down
+                               return "Error: The server is not responding. 
Please try later"
                except urllib2.HTTPError, e:
-                       errcode = e.code
                        errText = e.read()
                        errMsg = "\n".join(errText.splitlines()[4:])
                        dabo.errorLog.write(_("HTTP Error getting app list: 
%s") % e)




_______________________________________________
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