]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/balancer: use "==" and "!=" for comparing str 36036/head
authorKefu Chai <kchai@redhat.com>
Mon, 6 Jul 2020 11:16:00 +0000 (19:16 +0800)
committerNathan Cutler <ncutler@suse.com>
Fri, 10 Jul 2020 21:32:36 +0000 (23:32 +0200)
commitccc89c34da5cf211ba09bb6c1abb1d591d1503bb
tree591124b165a02ba817a14d1f88f606046553378e
parent690c7ca1a27b11ba119fbc95e96319b1f3233753
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>
(cherry picked from commit 65dc464977b4c2ea5ab19b8d9d0904ab31f08b94)
src/pybind/mgr/balancer/module.py