Группа :: Development/Python3
Пакет: pytables
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
Патч: 0006-Fix-pttree.patch
Скачать
Скачать
From: Antonio Valentino <antonio.valentino@tiscali.it>
Date: Sat, 21 Dec 2019 16:52:35 +0000
Subject: 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.
---
tables/scripts/pttree.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
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)