Skip to content

Commit

Permalink
Merge pull request #4666 from dalthviz/fixes_issue_4665
Browse files Browse the repository at this point in the history
PR: Don't register external plugins if check_compatibility fails
  • Loading branch information
ccordoba12 authored Jun 28, 2017
2 parents 1950344 + b495c7b commit ee494c7
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions spyder/app/mainwindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -1066,8 +1066,15 @@ def add_ipm_action(text, path):
for mod in get_spyderplugins_mods():
try:
plugin = mod.PLUGIN_CLASS(self)
self.thirdparty_plugins.append(plugin)
plugin.register_plugin()
try:
# Not all the plugins have the check_compatibility method
# i.e Breakpoints, Profiler, Pylint
check = plugin.check_compatibility()[0]
except AttributeError:
check = True
if check:
self.thirdparty_plugins.append(plugin)
plugin.register_plugin()
except Exception as error:
print("%s: %s" % (mod, str(error)), file=STDERR)
traceback.print_exc(file=STDERR)
Expand Down

0 comments on commit ee494c7

Please sign in to comment.