Blob Blame History Raw
From 7c4c4ba050252ba2ecce06672cb6a7dae34a5044 Mon Sep 17 00:00:00 2001
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sat, 21 Dec 2019 18:18:01 +0100
Subject: [PATCH] Fix syntax warnings

---
 tables/scripts/pttree.py | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tables/scripts/pttree.py b/tables/scripts/pttree.py
index 8101a6bf78..a3cad7e3a3 100644
--- a/tables/scripts/pttree.py
+++ b/tables/scripts/pttree.py
@@ -221,7 +221,6 @@ def get_tree_str(f, where='/', max_depth=-1, print_class=True,
             else:
                 leaves.append(node)
 
-
     # on the second pass we start at each leaf and work upwards towards the
     # root node, computing the cumulative size of each branch at each node, and
     # instantiating a PrettyTree object for each node to create an ASCII
@@ -317,7 +316,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 +325,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