Plugins body gets executed when picard starts, even if plugin is disabled

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Normal
    • 3.0.0a1
    • Affects Version/s: 1.2, 2.0.4
    • Component/s: Plugins API
    • None

      When Picard starts, it imports (with some magic around) every plugin – even if it is disabled. Thus the "body" of the module is executed.

      This as several drawbacks:

      1) Functions like register_*_action() will add even disabled plugins to the _*_actions lists, so the plugin has to be checked whether it is enabled every time (see plugins.ExtensionPoint.__inter__())

      2) Setup code in the body of the plugin will be executed even if the plugin is not used.

      Using the std-libs modulefinder module, it should not be to hard working around this.

            Assignee:
            Philipp Wolfer
            Reporter:
            brainz34
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

                Version Package
                3.0.0a1