Skip to content

Commit

Permalink
Use local members variable instead of modifying attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
jni committed Oct 30, 2023
1 parent b6d53d3 commit 8a9e3bc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pooch/processors.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,13 @@ def __call__(self, fname, action, pooch):
else:
archive_dir = fname.rsplit(os.path.sep, maxsplit=1)[0]
self.extract_dir = os.path.join(archive_dir, self.extract_dir)
if self.members is None:
self.members = self._all_members(fname)
members = self.members or self._all_members(fname)
if (
(action in ("update", "download"))
or (not os.path.exists(self.extract_dir))
or not all(
os.path.exists(os.path.join(self.extract_dir, m))
for m in self.members
for m in members
)
):
# Make sure that the folder with the extracted files exists
Expand Down

0 comments on commit 8a9e3bc

Please sign in to comment.