Inject plugin_info object into plugin implementations as well
This commit is contained in:
parent
982d121d3b
commit
1370c7a9cc
2 changed files with 3 additions and 0 deletions
|
|
@ -299,6 +299,8 @@ An overview of these properties follows.
|
|||
The plugin's name, as taken from either the ``__plugin_name__`` control property or the package info.
|
||||
``self._plugin_version``
|
||||
The plugin's version, as taken from either the ``__plugin_version__`` control property or the package info.
|
||||
``self._plugin_info``
|
||||
The :class:`octoprint.plugin.core.PluginInfo` object associated with the plugin.
|
||||
``self._basefolder``
|
||||
The plugin's base folder where it's installed. Can be used to refer to files relative to the plugin's installation
|
||||
location, e.g. included scripts, templates or assets.
|
||||
|
|
|
|||
|
|
@ -902,6 +902,7 @@ class PluginManager(object):
|
|||
identifier=name,
|
||||
plugin_name=plugin.name,
|
||||
plugin_version=plugin.version,
|
||||
plugin_info=plugin,
|
||||
basefolder=os.path.realpath(plugin.location),
|
||||
logger=logging.getLogger(self.logging_prefix + name),
|
||||
))
|
||||
|
|
|
|||
Loading…
Reference in a new issue