Ticket #4414 (closed defect: fixed)

Opened 8 months ago

Last modified 8 months ago

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

Change History

comment:1 Changed 8 months ago by kovidgoyal

  • Status changed from new to closed
  • Resolution set to fixed

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

Note: See TracTickets for help on using tickets.