def from_launch(cls, plugin, launch): try: legacyplugin = get_launch_class(plugin) pi = legacyplugin() # FIXME - inject context - plugin pk/instance is required here info = cls.from_instance(pi) except: _logger.exception("Failed to build and parse python class for legacy launch.sh - '%s':'%s'", plugin, launch) info = { 'name': os.path.basename(os.path.dirname(launch)), 'version': get_version_launchsh(launch), } return info
def from_launch(cls, plugin, launch): try: legacyplugin = get_launch_class(plugin) pi = legacyplugin() # FIXME - inject context - plugin pk/instance is required here info = cls.from_instance(pi) except: _logger.exception( "Failed to build and parse python class for legacy launch.sh - '%s':'%s'", plugin, launch) info = { 'name': os.path.basename(os.path.dirname(launch)), 'version': get_version_launchsh(launch), } return info