Detect plugins without Python 3.x support and warn user.

To allow users to sort out their plugins before EDMC itself moves to
Python 3.x warn them if any of their enabled, non-stock, plugins do not
have a plugin_start3() method.

  * If any are found without support there's a popup triggered at the
    end of AppWindow initialisation.
  * Then the user can check Settings > Plugins to see a list of the
    plugins without Python 3.x support.
This commit is contained in:
Athanasius committed 2020-06-18 19:40:46 +01:00
1 parent 2aa5154a1a
commit d3abb6fa1f
3 files changed
+28

No files matched your search

+9
View File
@@ -65,6 +65,7 @@ GuiFocusCodex = 11
# List of loaded Plugins
PLUGINS = []
PLUGINS_not_py3 = []
# For asynchronous error display
last_error = {
@@ -195,6 +196,14 @@ def load_plugins(master):
print_exc()
PLUGINS.extend(sorted(found, key = lambda p: operator.attrgetter('name')(p).lower()))
#########################################################
# Detect plugins that aren't yet ready for Python 3.x
#########################################################
for p in PLUGINS:
if p.module and p.folder and not p._get_func('plugin_start3'):
PLUGINS_not_py3.append(p)
#########################################################
imp.release_lock()
def provides(fn_name):