Skip to content

Commit

Permalink
Don't clobber iter
Browse files Browse the repository at this point in the history
  • Loading branch information
graeme-winter committed Oct 31, 2024
1 parent cb5c5dc commit f515d42
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/dxtbx/model/experiment_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
from typing import Any, Callable, Generator, Iterable

import natsort
import tqdm
from tqdm import tqdm

import dxtbx
from dxtbx.format.Format import Format
Expand Down Expand Up @@ -674,11 +674,11 @@ def from_filenames(
format_kwargs = {}

if os.isatty and len(filenames) > 1:
iter = tqdm.tqdm(to_process, total=len(filenames))
filename_iter = tqdm(to_process, total=len(filenames))
else:
iter = to_process
filename_iter = to_process

for filename in iter:
for filename in filename_iter:
# We now have a file, pre-opened by Format.open_file (therefore
# cached). Determine its type, and prepare to put into a group
format_class = find_format.find_format(filename)
Expand Down

0 comments on commit f515d42

Please sign in to comment.