dabo Commit
Revision 4916
Date: 2009-01-11 08:07:01 -0800 (Sun, 11 Jan 2009)
Author: Ed
Trac: http://trac.dabodev.com/changeset/4916
Changed:
U trunk/dabo/dApp.py
Log:
Added some additional error handling code to the web update process because of
a report by Kevin Grover. I couldn't repro his error, but added this code just
in case.
Diff:
Modified: trunk/dabo/dApp.py
===================================================================
--- trunk/dabo/dApp.py 2009-01-08 12:44:19 UTC (rev 4915)
+++ trunk/dabo/dApp.py 2009-01-11 16:07:01 UTC (rev 4916)
@@ -577,6 +577,9 @@
"""Get any changed files from the dabodev.com server, and
replace
the local copies with them. Return the new revision number"""
fileurl =
"http://dabodev.com/frameworkVersions/changedFiles/%s/%s"
+ if projNames is None:
+ dabo.errorLog.write(_("No project specified for
_updateFramework()"))
+ return
for pn in projNames:
currvers = self._currentUpdateVersion(pn)
if pn == "Dabo":
@@ -595,7 +598,7 @@
respFiles = resp.read()
if not respFiles:
# No updates available
- dabo.errorLog.write(_("No changed files
available for %s.") % pn)
+ dabo.infoLog.write(_("No changed files
available for %s.") % pn)
continue
flist = eval(respFiles)
# First element is the web directory
@@ -616,6 +619,7 @@
resp = urllib2.urlopen(url % (webdir,
fpth))
file(localFile, "w").write(resp.read())
url = "http://dabodev.com/frameworkVersions/latest"
+ vers = None
try:
vers = int(urllib2.urlopen(url).read())
except ValueError:
@@ -623,7 +627,8 @@
except StandardError, e:
dabo.errorLog.write(_("Cannot access the Dabo site.
Error: %s") % e)
vers = self._currentUpdateVersion()
- self.PreferenceManager.setValue("current_version", vers)
+ if vers:
+ self.PreferenceManager.setValue("current_version", vers)
return vers
_______________________________________________
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]