]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/balancer: use "==" and "!=" for comparing str 35943/head
authorKefu Chai <kchai@redhat.com>
Mon, 6 Jul 2020 11:16:00 +0000 (19:16 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 8 Jul 2020 04:04:52 +0000 (12:04 +0800)
commit65dc464977b4c2ea5ab19b8d9d0904ab31f08b94
treea1d61e8c37a33884510101f6a98a367a9ecfb1d7
parent02fc51deb7f3f635fef41321da03283b165eb7ef
pybind/mgr/balancer: use "==" and "!=" for comparing str

we cannot assume that two values with the same value share the same
identity in Python.

also silences warnings like:

balancer/module.py:473: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if pool_ids is '':

Fixes: https://tracker.ceph.com/issues/46406
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/pybind/mgr/balancer/module.py