def enable_current_package(self):
        av = self._available_packages_list
        item = av.currentItem()
        codepath = str(item.text())
        pm = get_package_manager()

        try:
            new_deps = self._current_package.dependencies()
        except Exception, e:
            debug.critical("Failed getting dependencies of package %s, "
                           "so it will not be enabled" +
                            self._current_package.name,
                            e)
            return
        from vistrails.core.modules.basic_modules import identifier as basic_modules_identifier
        if self._current_package.identifier != basic_modules_identifier:
            new_deps.append(basic_modules_identifier)

        try:
            pm.check_dependencies(self._current_package, new_deps)
        except Package.MissingDependency, e:
            debug.critical("Missing dependencies", e)
        else:
            # Deselects available list to prevent another package from getting
            # selected once the current item leaves the list
            self._available_packages_list.setCurrentItem(None)

            palette = QModulePalette.instance()
            palette.setUpdatesEnabled(False)
            try:
                pm.late_enable_package(codepath)
            except (Package.InitializationFailed, MissingRequirement), e:
                debug.unexpected_exception(e)
                debug.critical("Initialization of package '%s' failed" %
                               codepath,
                               e)
                # Loading failed: reselect the item
                self._available_packages_list.setCurrentItem(item)
                raise
            finally:
                palette.setUpdatesEnabled(True)
            # the old code that used to be here to update the lists
            # has been moved to package_added
            self.invalidate_current_pipeline()
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/gui/preferences.py/QPackagesWidget.enable_current_package/operator `%` -> `+`