Example #1
0
File: info.py Project: gourneau/TS
    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
Example #2
0
File: info.py Project: tw7649116/TS
    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