]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
pybind/mgr/balancer: use "==" and "!=" for comparing str 37471/head
authorKefu Chai <kchai@redhat.com>
Mon, 6 Jul 2020 11:16:00 +0000 (19:16 +0800)
committerNathan Cutler <ncutler@suse.com>
Tue, 29 Sep 2020 16:32:35 +0000 (18:32 +0200)
commita714115efaa3cbc5c6c39fa8eafde4777ef92023
treec1bc9c60c96d30881c7c23ad2fa942329f85644c
parenta3363c736f9076fa329a9aaff25ea82b817b5115
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