From 90982f136c2323cdacf2861020357d0eb4d34780 Mon Sep 17 00:00:00 2001 From: Bassem Debbabi Date: Wed, 13 Apr 2016 15:50:00 +0200 Subject: [PATCH] Correct the suggested solution for issue #35 --- python/cohorte/boot/loaders/osgi_inner.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/python/cohorte/boot/loaders/osgi_inner.py b/python/cohorte/boot/loaders/osgi_inner.py index 1b85ee56..2e4eb50d 100644 --- a/python/cohorte/boot/loaders/osgi_inner.py +++ b/python/cohorte/boot/loaders/osgi_inner.py @@ -704,15 +704,16 @@ def load(self, configuration): elif bundle.file == osgi_jar_file: _logger.debug("OSGi framework is already installed.") else: - _logger.debug("Installing Java bundle %s...", bundle.name) - java_bundles.append(context.installBundle(bundle.url)) + _logger.debug("Installing Java bundle %s (is_fragment=%s)...", bundle.name, bundle.is_fragment()) + b = context.installBundle(bundle.url) + if not bundle.is_fragment(): + java_bundles.append(b) try: # Start the bundles for bundle in java_bundles: - _logger.debug("Starting %s...", bundle.getSymbolicName()) - if not bundle.is_fragment(): - bundle.start() + _logger.debug("Starting %s...", bundle.getSymbolicName()) + bundle.start() except jpype.JavaException as ex: # Log the bundle exception and its cause _logger.error("Error starting bundle: %s",