Skip to content
Snippets Groups Projects
Commit 336faa30 authored by Tamas Gal's avatar Tamas Gal :speech_balloon:
Browse files

Fix display issue on some files

parent 2e6cf489
No related branches found
Tags v0.5.0
No related merge requests found
Pipeline #7599 passed with warnings
......@@ -16,13 +16,16 @@ Options:
"""
import uproot
def print_tree(filename):
f = uproot.open(filename)
for key, ttree in f.items():
for key in f.keys():
try:
print("{:<30} : {:>9} items".format(key.decode(), len(ttree)))
print("{:<30} : {:>9} items".format(key.decode(), len(f[key])))
except TypeError:
print("{}".format(key.decode()))
except NotImplementedError:
print("{} (TStreamerSTL)".format(key.decode()))
def main():
......@@ -34,6 +37,3 @@ def main():
if __name__ == '__main__':
main()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment