Fixed 2-point versions; did allow any 2-point less that gramps to load-- now must match 1-point parts (3.2)

svn: r14318
This commit is contained in:
Doug Blank 2010-02-11 13:45:51 +00:00
parent 66786a3074
commit f342323d6a

View File

@ -142,11 +142,14 @@ def valid_plugin_version(plugin_version_string):
"""
dots = plugin_version_string.count(".")
if dots == 1:
plugin_version = [int(n) for n in plugin_version_string.split(".", 1)]
return tuple(plugin_version) == (VERSION_TUPLE[0], VERSION_TUPLE[1])
plugin_version = tuple([int(n) for n in
plugin_version_string.split(".", 1)])
return plugin_version == VERSION_TUPLE[:2]
elif dots == 2:
plugin_version = [int(n) for n in plugin_version_string.split(".", 2)]
return tuple(plugin_version) <= VERSION_TUPLE
plugin_version = tuple([int(n) for n in
plugin_version_string.split(".", 2)])
return (plugin_version[:2] == VERSION_TUPLE[:2] and
plugin_version <= VERSION_TUPLE)
return False
class PluginData(object):