Commit d4409e8
NIK-TIGER-BILL
fix(storage): add _is_open guard in ZipStore.exists to prevent AttributeError
ZipStore.exists() did not call self._sync_open() before accessing
self._lock, causing AttributeError when called on an unopened store.
Add the same _is_open check that other ZipStore methods (get, set,
set_if_not_exists, delete) already use.
Also add a regression test that instantiates ZipStore without an
explicit .open() call and verifies exists() works correctly.
Fixes #3588
Signed-off-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>1 parent 3a2ce2f commit d4409e8
2 files changed
Lines changed: 20 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
248 | 250 | | |
249 | 251 | | |
250 | 252 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
139 | 139 | | |
140 | 140 | | |
141 | 141 | | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
142 | 160 | | |
143 | 161 | | |
144 | 162 | | |
| |||
0 commit comments