From: Antonio Valentino Date: Sat, 21 Dec 2019 16:52:35 +0000 (+0000) Subject: Fix pttree X-Git-Tag: archive/raspbian/3.10.2-1+rpi1~1^2^2^2~3 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=244f89a35b23674e10ac4c15edba6ebe3e206011;p=pytables.git Fix pttree Fix the mamagement of UnImplemented objects in the pttree tool. Patch backorted from upstream: https://github.com/PyTables/PyTables/commit/5280b856189a05ceee8f034d8781d052fb5dbe5a Closes: #941954. Gbp-Pq: Name 0006-Fix-pttree.patch --- diff --git a/tables/scripts/pttree.py b/tables/scripts/pttree.py index 1ba7045..8101a6b 100644 --- a/tables/scripts/pttree.py +++ b/tables/scripts/pttree.py @@ -175,7 +175,10 @@ def get_tree_str(f, where='/', max_depth=-1, print_class=True, ref_idx[path] = ref_count[addr] hl_addresses[path] = addr - if isinstance(node, tables.Leaf): + if isinstance(node, tables.UnImplemented): + leaves.append(node) + + elif isinstance(node, tables.Leaf): # only count the size of a hardlinked leaf the first time it is # visited @@ -201,7 +204,7 @@ def get_tree_str(f, where='/', max_depth=-1, print_class=True, except NotImplementedError as e: # size_on_disk is not implemented for VLArrays - warnings.warn(e.message) + warnings.warn(str(e)) # push leaf nodes onto the stack for the next pass leaves.append(node)