From 832d17f261c902747e01a12f84d3647e79a84052 Mon Sep 17 00:00:00 2001 From: Antonio Valentino Date: Sat, 21 Dec 2019 17:20:44 +0000 Subject: [PATCH] Fix syntax warnings See https://github.com/PyTables/PyTables/commit/7c4c4ba050252ba2ecce06672cb6a7dae34a5044 Closes: #945282. Gbp-Pq: Name 0007-Fix-syntax-warnings.patch --- tables/scripts/pttree.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tables/scripts/pttree.py b/tables/scripts/pttree.py index 8101a6b..e96c002 100644 --- a/tables/scripts/pttree.py +++ b/tables/scripts/pttree.py @@ -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 -- 2.30.2