Skip to content

Commit 4950336

Browse files
committed
Fix circular variable assignment.
1 parent 7070c49 commit 4950336

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

heudiconv/main.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -263,13 +263,13 @@ def workflow(*, dicom_dir_template=None, files=None, subjs=None,
263263

264264
# processed_studydirs = set()
265265

266-
for (locator, session, sid), files_or_seqinfo in study_sessions.items():
266+
for (locator_ext, session_ext, sid), files_or_seqinfo in study_sessions.items():
267267

268-
# Allow for session to be overloaded from command line
269-
if session is not None:
270-
session = session
271-
if locator is not None:
272-
locator = locator
268+
# Only use extracted session/locator if not provided explicitly
269+
if session is None:
270+
session = session_ext
271+
if locator is None:
272+
locator = locator_ext
273273
if not len(files_or_seqinfo):
274274
raise ValueError("nothing to process?")
275275
# that is how life is ATM :-/ since we don't do sorting if subj

0 commit comments

Comments
 (0)