#7532 install + open content bundles through journal

This commit is contained in:
Daniel Drake
2008-07-16 12:48:31 -04:00
parent 5d5f75f7e3
commit 02d3799b54
2 changed files with 38 additions and 4 deletions
+18
View File
@@ -169,6 +169,24 @@ class DSObject(object):
logging.debug('activityfactory.creating bundle with id %r',
bundle.get_bundle_id())
activityfactory.create(bundle.get_bundle_id())
elif self.is_content_bundle() and not bundle_id:
logging.debug('Creating content bundle')
bundle = ContentBundle(self.file_path)
if not bundle.is_installed():
logging.debug('Installing content bundle')
bundle.install()
activities = self._get_activities_for_mime('text/html')
if len(activities) == 0:
logging.warning('No activity can open HTML content bundles')
return
uri = bundle.get_start_uri()
logging.debug('activityfactory.creating with uri %s', uri)
activityfactory.create_with_uri(activities[0].bundle_id,
bundle.get_start_uri())
else:
if not self.get_activities() and bundle_id is None:
logging.warning('No activity can open this object, %s.' %