diff options
| author | Christophe Simonis <christophe@tinyerp.com> | 2008-12-02 17:47:26 +0100 |
|---|---|---|
| committer | Christophe Simonis <christophe@tinyerp.com> | 2008-12-02 17:47:26 +0100 |
| commit | 49c441b3a494fe561573d9c3e3fdc0856b294c4f (patch) | |
| tree | 848aba8c31c8d64e16627409c516c55cfe9eeab3 /bin/addons/base/module/module.py | |
| parent | 7d7743f1b06d7bdc3edba7f6e91fbd3cb42e54fe (diff) | |
[IMP] move parse_version to tools directory
[IMP] release.py set major_version variable
bzr revid: christophe@tinyerp.com-20081202164726-0d9d0gz89d6y7v2l
Diffstat (limited to 'bin/addons/base/module/module.py')
| -rw-r--r-- | bin/addons/base/module/module.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/bin/addons/base/module/module.py b/bin/addons/base/module/module.py index 71005bcec34..32519086e77 100644 --- a/bin/addons/base/module/module.py +++ b/bin/addons/base/module/module.py @@ -35,7 +35,7 @@ import addons import pooler import netsvc -from parse_version import parse_version +from tools.parse_version import parse_version class module_repository(osv.osv): _name = "ir.module.repository" @@ -53,7 +53,7 @@ class module_repository(osv.osv): } _defaults = { 'sequence': lambda *a: 5, - 'filter': lambda *a: 'href="([a-zA-Z0-9_]+)-('+release.version.rsplit('.', 1)[0]+'.(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\\d*)*)(-r(\\d+))?)(\.zip)"', + 'filter': lambda *a: 'href="([a-zA-Z0-9_]+)-('+release.major_version+'.(\\d+)((\\.\\d+)*)([a-z]?)((_(pre|p|beta|alpha|rc)\\d*)*)(-r(\\d+))?)(\.zip)"', 'active': lambda *a: 1, } _order = "sequence" @@ -91,7 +91,7 @@ class module(osv.osv): data = f.read() info = eval(data) if 'version' in info: - info['version'] = release.version.rsplit('.', 1)[0] + '.' + info['version'] + info['version'] = release.major_version + '.' + info['version'] f.close() except: return {} @@ -326,8 +326,7 @@ class module(osv.osv): if not os.path.isfile( mod_path ): import imp - # XXX must restrict to only addons paths - path = imp.find_module(mod_name) + path = imp.find_module(mod_name, [addons.ad, addons._ad]) imp.load_module(name, *path) else: import zipimport |
