Ticket #4414 (closed defect: fixed)
Plugin Loading Bug
| Reported by: | teisenbe | Owned by: | kovidgoyal |
|---|---|---|---|
| Priority: | minor | Milestone: | |
| Component: | Command Line Interface | Version: | trunk |
| Keywords: | Cc: |
Description
While working on an Input Format Plugin?, I was having some issues adding the plugin to calibre. It appears the problem is that calibre's plugin loading routine is mistaking the Plugin class to be the plugin that is desired for loading (since the Plugin class occurs before my plugin's class in the dictionary populated by exec). src/calibre/customize/ui.py:67 is the start of the relevant lines.
One rough work around is to add a conditional to the loop that tests to see if the found class is Plugin, Input Format Plugin?, Output Format Plugin?, etc and then to skip the iteration if that is the case. I'm posting a bug instead of a patch because I'm a bit rusty with Python, and am sure there's a more elegant solution than to hard code the possible subclasses.
Bug identified occurs always under python 2.6.4 on Gentoo Linux

Fixed in branch trunk. The fix will be in the next release.