Branch: refs/heads/master
Home: https://github.com/tribe29/checkmk
Commit: 536e2eb4cb48d23c50b1d2e807fe8ee5322915c7
https://github.com/tribe29/checkmk/commit/536e2eb4cb48d23c50b1d2e807fe8ee53…
Author: Lukas Lengler <lukas.lengler(a)tribe29.com>
Date: 2019-09-02 (Mon, 02 Sep 2019)
Changed paths:
M cmk/gui/plugins/userdb/hook_auth.py
M cmk/gui/plugins/userdb/ldap_connector.py
M cmk/gui/plugins/views/availability.py
M cmk/gui/plugins/views/inventory.py
M cmk/gui/plugins/views/mkeventd.py
M cmk/gui/plugins/views/utils.py
M cmk/gui/plugins/views/webservice.py
M cmk/gui/plugins/visuals/inventory.py
M cmk/gui/table.py
M cmk/gui/valuespec.py
M cmk/gui/views.py
M cmk/gui/watolib/changes.py
M cmk/gui/watolib/tags.py
Log Message:
-----------
Python 3: Replaced isinstance(unicode) 2
Replaced isinstance(unicode) with isinstance(six.text_type)
Change-Id: Iae12352caff2c2080d020ed245ed4a931b5d8113
Branch: refs/heads/master
Home: https://github.com/tribe29/checkmk
Commit: e17b7a9809be4dbeca5e031a443734b344aa4ac7
https://github.com/tribe29/checkmk/commit/e17b7a9809be4dbeca5e031a443734b34…
Author: Lukas Lengler <lukas.lengler(a)tribe29.com>
Date: 2019-09-02 (Mon, 02 Sep 2019)
Changed paths:
M checks/apache_status
M cmk/gui/availability.py
M cmk/gui/plugins/views/availability.py
M cmk/gui/plugins/wato/bi.py
M cmk/gui/table.py
M cmk/gui/utils.py
M cmk/gui/visuals.py
M cmk/gui/wato/pages/folders.py
M cmk/utils/__init__.py
M cmk/utils/misc.py
M cmk_base/config.py
M cmk_base/snmp.py
Log Message:
-----------
Python 3: Clean up cmp_to_key
x = [({"title": "test1"}, "A"),
({"title": "test1" }, "A"),
({"title": "test2"}, "B")]
expected1 = sorted(x, cmp=lambda a, b: cmp(a[1][0], b[1][0]) or cmp(a[0]["title"], b[0]["title"]))
sol1 = sorted(x, key=lambda x: (x[1][0], x[0]["title"]))
expected2 = sorted(x, cmp=lambda a, b: -cmp(a[1][0], b[1][0]) or cmp(a[0]["title"], b[0]["title"]))
sol2 = sorted(sorted(x, key=lambda x: (x[0]["title"])), key=lambda x: x[1][0], reverse=True)
assert expected1 == sol1, "1. Solution does not work"
assert expected2 == sol2, "2. Solution does not work"
print "It works!"
Short test for "or" cases. Expand input data if there are insecurities
1st assertion is for normal "or" cases
2nd one is for cmk/gui/visuals.py case
Change-Id: Id2aeec321640cc390da69d6fc6ca43baf448b8c1