diff --git a/anybox/recipe/odoo/utils.py b/anybox/recipe/odoo/utils.py index a85c15a7..e635197a 100644 --- a/anybox/recipe/odoo/utils.py +++ b/anybox/recipe/odoo/utils.py @@ -11,7 +11,7 @@ logger = logging.getLogger(__name__) -MAJOR_VERSION_RE = re.compile(r'(\d+)[.](saas~|)(\d*)(\w*)') +MAJOR_VERSION_RE = re.compile(r'(saas~)?(\d+)[.](saas~|)(\d*)(\w*)') class WorkingDirectoryKeeper(object): @@ -85,8 +85,8 @@ def major_version(version_string): if m is None: raise ValueError("Unparseable version string: %r" % version_string) - major = int(m.group(1)) - minor = m.group(3) + major = int(m.group(2)) + minor = m.group(4) try: return major, int(minor)