From 3ccd79e3caebfb253976a04201715295d5a8be49 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Tue, 18 Sep 2007 23:34:04 +0200 Subject: [PATCH] Don't crash when entering the detailed view if the activity which created the entry is no more installed. --- sugar/datastore/datastore.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sugar/datastore/datastore.py b/sugar/datastore/datastore.py index 4a846bd3..40bb1cab 100644 --- a/sugar/datastore/datastore.py +++ b/sugar/datastore/datastore.py @@ -108,10 +108,10 @@ class DSObject(object): if self.metadata['activity']: activity_info = activity.get_registry().get_activity(self.metadata['activity']) - activities.append(activity_info) + if activity_info: + activities.append(activity_info) mime_type = self.metadata['mime_type'] - print mime_type if mime_type: activities_info = activity.get_registry().get_activities_for_type(mime_type) for activity_info in activities_info: