Add an --ignore-plugins option to calibre.exe

This commit is contained in:
Kovid Goyal 2011-01-13 10:08:35 -07:00
parent b2ad17d7ff
commit 9c53adfbb9
2 changed files with 5 additions and 0 deletions

View File

@ -34,6 +34,9 @@ path_to_ebook to the database.
help=_('Log debugging information to console')) help=_('Log debugging information to console'))
parser.add_option('--no-update-check', default=False, action='store_true', parser.add_option('--no-update-check', default=False, action='store_true',
help=_('Do not check for updates')) help=_('Do not check for updates'))
parser.add_option('--ignore-plugins', default=False, action='store_true',
help=_('Ignore custom plugins, useful if you installed a plugin'
' that is preventing calibre from starting'))
return parser return parser
def init_qt(args): def init_qt(args):

View File

@ -103,6 +103,8 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{
self.gui_debug = gui_debug self.gui_debug = gui_debug
acmap = OrderedDict() acmap = OrderedDict()
for action in interface_actions(): for action in interface_actions():
if opts.ignore_plugins and action.plugin_path is not None:
continue
try: try:
ac = action.load_actual_plugin(self) ac = action.load_actual_plugin(self)
except: except: