Skip to content

Commit d7b8df4

Browse files
committed
Fix dbic_bids.py compatibility with python 3.x
1 parent 4024047 commit d7b8df4

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

bin/heudiconv

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,6 @@ def _main(args):
17251725
# Load heuristic -- better do it asap to make sure it loads correctly
17261726
#
17271727
heuristic = load_heuristic(os.path.realpath(args.heuristic_file))
1728-
17291728
# TODO: Move into a function!
17301729
study_sessions = get_study_sessions(
17311730
dicom_dir_template, files_opt,

heuristics/dbic_bids.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,7 @@ def infotoids(seqinfos, outdir):
560560
# e.g. {date}
561561
session_ = session_.format(**s._asdict())
562562
ses_markers.append(session_)
563-
564-
ses_markers = filter(bool, ses_markers) # only present ones
563+
ses_markers = list(filter(bool, ses_markers)) # only present ones
565564
session = None
566565
if ses_markers:
567566
# we have a session or possibly more than one even
@@ -628,7 +627,6 @@ def sanitize_str(value):
628627
def parse_dbic_protocol_name(protocol_name):
629628
"""Parse protocol name according to our convention with minimal set of fixups
630629
"""
631-
632630
# Since Yarik didn't know better place to put it in, but could migrate outside
633631
# at some point
634632
protocol_name = protocol_name.replace("anat_T1w", "anat-T1w")

0 commit comments

Comments
 (0)