]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph_argparse.py: pep8 E721 don't compare types, use 'isinstance()'
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 3 Mar 2015 10:10:25 +0000 (11:10 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Tue, 3 Mar 2015 12:01:46 +0000 (13:01 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/pybind/ceph_argparse.py

index 7640696fccc0aa3d10824781031d5c2e69da3bed..e66ded54a8c36dd4cd13440cfec67b08d489ed30 100644 (file)
@@ -647,7 +647,7 @@ def parse_funcsig(sig):
             # locally-defined class. otherwise, we haven't a clue.
             if desc['type'] in globals():
                 t = globals()[desc['type']]
-                if type(t) != types.TypeType:
+                if not isinstance(t, types.TypeType):
                     s = 'unknown type {0}'.format(desc['type'])
                     raise JsonFormat(s)
             else: