Skip to content
Snippets Groups Projects
Commit 92f1f41e3366 authored by Vincent Hatakeyama's avatar Vincent Hatakeyama
Browse files

:sparkles: Not respecting min_version now stops scripts

parent ca1658f6b33b
No related branches found
No related tags found
1 merge request!238✨ Not respecting min_version now stops scripts
Not respecting min_version now stops scripts
\ No newline at end of file
......@@ -46,6 +46,10 @@
_logger = logging.getLogger(__name__)
class InvalidVersion(Exception):
"""The odoo_scripts version is not what is expected"""
class Configuration:
"""
At the moment, only read from `setup.cfg`.
......@@ -211,7 +215,10 @@
self.min_version: Version
read_expanded("min_version", parse("0"), parse)
if hasattr(self, "min_version") and parse(version) < self.min_version:
_logger.error("Odoo scripts %s is less than %s", version, self.min_version)
_logger.fatal("Odoo scripts %s is less than %s", version, self.min_version)
raise InvalidVersion(
"Odoo scripts {} is less than {}".format(version, self.min_version)
)
self.python_packages: Dict[str, Dict[str, Union[str, List[Tuple[str, str]]]]]
if toread("python_packages"):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment