From abd0e78188b0b5d8a8cf143f4a5de51975e064b1 Mon Sep 17 00:00:00 2001 From: kakwok Date: Thu, 4 Aug 2022 17:03:05 +0200 Subject: [PATCH] Set ReadOnlyDirectory attributes when fSeekKeys == 0 (#660) * Set ReadOnlyDirectory attributes when fSeekKeys == 0 * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: Martin Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- src/uproot/reading.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/uproot/reading.py b/src/uproot/reading.py index 2fe169345..455943c04 100644 --- a/src/uproot/reading.py +++ b/src/uproot/reading.py @@ -1405,7 +1405,8 @@ def __init__(self, path, cursor, context, file, parent): if self._fSeekKeys == 0: self._header_key = None self._keys = [] - + self._keys_lookup = {} + self._len = None else: keys_start = self._fSeekKeys keys_stop = min(keys_start + self._fNbytesKeys + 8, file.fEND)