]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
cephfs-shell: Fix flake8 use != to compare str literals warning
authorVarsha Rao <varao@redhat.com>
Thu, 6 Jun 2019 15:21:31 +0000 (20:51 +0530)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 20 Jun 2019 22:39:26 +0000 (15:39 -0700)
Fixes: https://tracker.ceph.com/issues/40191
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit db7b9306fb94efbe0c12283c614554727fbf6f1e)

src/tools/cephfs/cephfs-shell

index ae6653e819a8c257ee84b1c24c811cfc5502c9af..d20ef3137ed718b35130d04d3d8a3503260cd163 100644 (file)
@@ -416,7 +416,7 @@ class CephFSShell(Cmd):
 
     class ModeAction(argparse.Action):
         def __init__(self, option_strings, dest, nargs=None, **kwargs):
-            if nargs is not None and nargs is not '?':
+            if nargs is not None and nargs != '?':
                 raise ValueError("more than one modes not allowed")
             super().__init__(option_strings, dest, **kwargs)