diff options
author | Reinier Heeres <reinier@heeres.eu> | 2007-12-18 12:43:34 (GMT) |
---|---|---|
committer | Reinier Heeres <reinier@heeres.eu> | 2007-12-18 12:43:34 (GMT) |
commit | d35c19b6aaeb79df700bf063f4bf3d298c20bf7a (patch) | |
tree | 24c78ed32e5c4c7ceb4461914d1b808345c09d78 /lib/sugar/datastore/datastore.py | |
parent | b57ff156f7b1125e37c8295c7bb4984a84f7de7f (diff) |
Allow activity up- and downgrades #4906, also fix #5382
Diffstat (limited to 'lib/sugar/datastore/datastore.py')
-rw-r--r-- | lib/sugar/datastore/datastore.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/sugar/datastore/datastore.py b/lib/sugar/datastore/datastore.py index 5238d18..334c866 100644 --- a/lib/sugar/datastore/datastore.py +++ b/lib/sugar/datastore/datastore.py @@ -160,10 +160,16 @@ class DSObject(object): if bundle_id is not None: raise ValueError('Object is a bundle, cannot be resumed as an activity.') + logging.debug('Creating activity bundle') bundle = ActivityBundle(self.file_path) if not bundle.is_installed(): + logging.debug('Installing activity bundle') bundle.install() + elif bundle.need_upgrade(): + logging.debug('Upgrading activity bundle') + bundle.upgrade() + logging.debug('activityfactory.creating bundle with id %r', bundle.get_bundle_id()) activityfactory.create(bundle.get_bundle_id()) else: if not self.get_activities() and bundle_id is None: |