From 9c53adfbb9c13870d9ff9634c59991a0ed07fd3a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 13 Jan 2011 10:08:35 -0700 Subject: [PATCH] Add an --ignore-plugins option to calibre.exe --- src/calibre/gui2/main.py | 3 +++ src/calibre/gui2/ui.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/src/calibre/gui2/main.py b/src/calibre/gui2/main.py index c8b5cb001e..aaca398e44 100644 --- a/src/calibre/gui2/main.py +++ b/src/calibre/gui2/main.py @@ -34,6 +34,9 @@ path_to_ebook to the database. help=_('Log debugging information to console')) parser.add_option('--no-update-check', default=False, action='store_true', 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 def init_qt(args): diff --git a/src/calibre/gui2/ui.py b/src/calibre/gui2/ui.py index 79bd1decc5..9eb202d761 100644 --- a/src/calibre/gui2/ui.py +++ b/src/calibre/gui2/ui.py @@ -103,6 +103,8 @@ class Main(MainWindow, MainWindowMixin, DeviceMixin, EmailMixin, # {{{ self.gui_debug = gui_debug acmap = OrderedDict() for action in interface_actions(): + if opts.ignore_plugins and action.plugin_path is not None: + continue try: ac = action.load_actual_plugin(self) except: