Branch: refs/heads/master
Home:
https://github.com/tribe29/checkmk
Commit: 0eda9ab90200224712839399e974213980d92c93
https://github.com/tribe29/checkmk/commit/0eda9ab90200224712839399e97421398…
Author: Lars Michelsen <lm(a)tribe29.com>
Date: 2019-09-17 (Tue, 17 Sep 2019)
Changed paths:
M cmk/gui/plugins/wato/omd_configuration.py
M cmk/gui/watolib/simple_config_file.py
M cmk/update_config.py
M cmk/utils/daemon.py
M cmk/utils/labels.py
M cmk/utils/man_pages.py
M cmk/utils/paths.py
M cmk/utils/store.py
M cmk/utils/werks.py
M omd/packages/omd/omdlib/certs.py
M tests-py3/conftest.py
M tests/conftest.py
M tests/unit/livestatus/test_livestatus_unit.py
M tests/unit/omdlib/test_certs.py
Log Message:
-----------
Improve Python 2/3 compatible Path import
The previous import based on try/expect did not work as intended,
because mypy did not understood that pathlib is only available with
Python 3. To suppress the import issues we added "# type: ignore" to
that line, which implicitly marked Path with the "Any" type. This way
it was not possible for mypy to detect issues with Path.
This new approach uses the recommended way of python version checks (see
https://github.com/python/mypy/blob/master/docs/source/common_issues.rst#py…).
With this variant it is now possible to detect wrong operations on
the Path object in our code which is meant to be portable during
the 2/3 transition (cmk.utils).
Change-Id: Ie37da4102c39e605cd0bfc5a48a2fc70f443109a