[PATCH olpc-os-builder 02/14] Don't choke on 404 errors for activity pages

Sascha Silbe silbe at activitycentral.com
Thu Mar 17 11:21:16 EDT 2011


From: Bernie Innocenti <bernie at codewiz.org>


Signed-off-by: Sascha Silbe <silbe at activitycentral.com>
---
 .../kspost.60.nochroot.activities.py               |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/modules/sugar_activity_group/kspost.60.nochroot.activities.py b/modules/sugar_activity_group/kspost.60.nochroot.activities.py
index 8b055e0..11d73fa 100644
--- a/modules/sugar_activity_group/kspost.60.nochroot.activities.py
+++ b/modules/sugar_activity_group/kspost.60.nochroot.activities.py
@@ -154,7 +154,10 @@ def parse_url(url, **urlopen_args):
     `bitfrost.util.urlrange.urlopen`."""
     import bitfrost.util.urlrange as urlrange
     with urlrange.urlopen(url, **urlopen_args) as f:
-        return parse_html(f.read(), f.url)
+	try:
+            return parse_html(f.read(), f.url)
+	except urllib2.HTTPError:
+            return None, None, []
 
 def generate_install_cmd(path):
     if path.endswith(".xol"):
-- 
1.7.4.1




More information about the Devel mailing list