mirror of
https://github.com/EDCD/EDMarketConnector.git
synced 2026-11-28 03:32:23 +03:00
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:
1 parent
2aa5154a1a
commit
d3abb6fa1f
3 files changed
+28
No files matched your search
@@ -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):
|
||||
|
||||
Reference in new issue
Block a user