From db6f09543e558cfaa5648fc9a47e86a81b9c745b Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Thu, 30 Jul 2009 07:08:32 +0000 Subject: Install .xo bundles while uploading to Journal --- diff --git a/src/jarabe/model/bundleregistry.py b/src/jarabe/model/bundleregistry.py index 2155208..eae33b3 100644 --- a/src/jarabe/model/bundleregistry.py +++ b/src/jarabe/model/bundleregistry.py @@ -210,6 +210,8 @@ class BundleRegistry(gobject.GObject): logging.debug('STARTUP: Adding bundle %r' % bundle_path) try: bundle = ActivityBundle(bundle_path) + logging.error(bundle_path) + logging.error(bundle) if install_mime_type: bundle.install_mime_type(bundle_path) except MalformedBundleException: @@ -330,12 +332,9 @@ class BundleRegistry(gobject.GObject): def install(self, bundle): activities_path = env.get_user_activities_path() - if self.get_bundle(bundle.get_bundle_id()): - raise AlreadyInstalledException - for installed_bundle in self._bundles: if bundle.get_bundle_id() == installed_bundle.get_bundle_id() and \ - bundle.get_activity_version() == \ + bundle.get_activity_version() <= \ installed_bundle.get_activity_version(): raise AlreadyInstalledException elif bundle.get_bundle_id() == installed_bundle.get_bundle_id(): -- cgit v0.9.1