diff options
author | Simon Schampijer <simon@schampijer.de> | 2007-10-16 12:11:44 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2007-10-16 12:11:44 (GMT) |
commit | 209831888e9a0e6603bb8c322d3f3ce4d48832ea (patch) | |
tree | 7ed129ec0ee8e8b8fa6f1fed3fbc549ca460001f /downloadmanager.py | |
parent | b31888b2e3eb6845b2dead0d7147c4ae0bf09f69 (diff) |
Removed hack to set the right service name for sharing
Diffstat (limited to 'downloadmanager.py')
-rw-r--r-- | downloadmanager.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/downloadmanager.py b/downloadmanager.py index d9ccfac..22a88cb 100644 --- a/downloadmanager.py +++ b/downloadmanager.py @@ -186,12 +186,17 @@ class Download: activities_info = activity.get_registry().get_activities_for_type( self._mime_type) activities = [] + bundle_id = None for activity_info in activities_info: activities.append(activity_info) - logging.debug('--> act=%s mime=%s'%(activities, self._mime_type)) bundle_id = activities[0].bundle_id - logging.debug('--> bundle_id=%s'%bundle_id) - activityfactory.create_with_object_id(bundle_id, self._object_id) + if bundle_id is not None: + logging.debug('--> Found activity to open mime=%s bundle_id=%s' + %(self._mime_type, bundle_id)) + activityfactory.create_with_object_id(bundle_id, self._object_id) + else: + logging.debug('--> Can not open mime=%s'%(self._mime_type)) + _activity.remove_alert(alert) def _cleanup_datastore_write(self): |