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:
Bryan Schumaker 2010-11-05 08:15:32 -04:00
parent f93b8178d5
commit 4a1ff91b57
1 changed files with 7 additions and 0 deletions

View File

@ -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