Fix syntax warnings
authorAntonio Valentino <antonio.valentino@tiscali.it>
Sat, 21 Dec 2019 17:20:44 +0000 (17:20 +0000)
committerAntonio Valentino <antonio.valentino@tiscali.it>
Tue, 8 Dec 2020 09:02:17 +0000 (09:02 +0000)
See https://github.com/PyTables/PyTables/commit/7c4c4ba050252ba2ecce06672cb6a7dae34a5044
Closes: #945282.
Gbp-Pq: Name 0007-Fix-syntax-warnings.patch

tables/scripts/pttree.py

index 8101a6bf78810604e28310ff9d30dd23f1628409..e96c002385743936ccde35bcecfe6e47ddc2e0e2 100644 (file)
@@ -317,7 +317,7 @@ def get_tree_str(f, where='/', max_depth=-1, print_class=True,
                 pretty[path].sort_by = node._v_name
             else:
                 # natural order
-                if path is '/':
+                if path == '/':
                     # root is not in root._v_children
                     pretty[path].sort_by = 0
                 else:
@@ -326,7 +326,7 @@ def get_tree_str(f, where='/', max_depth=-1, print_class=True,
 
             # exclude root node or we'll get infinite recursions (since '/' is
             # the parent of '/')
-            if path is not '/':
+            if path != '/':
 
                 # create a PrettyTree for the parent of this node, if one
                 # doesn't exist already