Plugins check version
We should check plugin versions when loading them. If the API changes in a future version, then old plugins shouldn't work.
This commit is contained in:
parent
f93b8178d5
commit
4a1ff91b57
|
@ -81,6 +81,13 @@ def load_plugin_rest(name, file):
|
|||
print "Error loading plugin: %s" % file
|
||||
print e
|
||||
|
||||
try:
|
||||
if mod.check_version() == False:
|
||||
print "Error: plugin %s requires a different version" % name
|
||||
return
|
||||
except:
|
||||
print "Warning: plugin %s doesn't check versions" % name
|
||||
|
||||
try:
|
||||
globals()[name] = mod
|
||||
loaded[name] = mod
|
||||
|
|
Loading…
Reference in New Issue