From: Antonio Valentino Date: Sat, 21 Dec 2019 17:20:44 +0000 (+0000) Subject: Fix syntax warnings X-Git-Tag: archive/raspbian/3.10.2-1+rpi1~1^2^2^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=832d17f261c902747e01a12f84d3647e79a84052;p=pytables.git Fix syntax warnings See https://github.com/PyTables/PyTables/commit/7c4c4ba050252ba2ecce06672cb6a7dae34a5044 Closes: #945282. Gbp-Pq: Name 0007-Fix-syntax-warnings.patch --- 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