Skip to content

Commit a3937de

Browse files
committed
fix: keep track of datalad messages
1 parent 3b1f846 commit a3937de

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

heudiconv/cli/run.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ def process_args(args):
268268
# the outdir -> study_outdir datasets if not yet there
269269
if args.datalad:
270270
from ..external.dlad import prepare_datalad
271-
prepare_datalad(anon_study_outdir, anon_outdir, anon_sid,
272-
args.session, seqinfo, dicoms, args.bids)
271+
dl_msg = prepare_datalad(anon_study_outdir, anon_outdir, anon_sid,
272+
args.session, seqinfo, dicoms, args.bids)
273273

274274
lgr.info("PROCESSING STARTS: {0}".format(
275275
str(dict(subject=sid, outdir=study_outdir, session=args.session))))
@@ -293,7 +293,7 @@ def process_args(args):
293293

294294
if args.datalad:
295295
from ..external.dlad import add_to_datalad
296-
msg = "Converted subject %s" % datalad_msg_suf
296+
msg = "Converted subject %s" % dl_msg
297297
# TODO: whenever propagate to supers work -- do just
298298
# ds.save(msg=msg)
299299
# also in batch mode might fail since we have no locking ATM

heudiconv/external/dlad.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def prepare_datalad(studydir, outdir, sid, session, seqinfo, dicoms, bids):
2323
add_to_datalad(outdir, studydir,
2424
msg="Preparing for %s" % datalad_msg_suf,
2525
bids=bids)
26-
26+
return datalad_msg_suf
2727

2828
def add_to_datalad(topdir, studydir, msg, bids):
2929
"""Do all necessary preparations (if were not done before) and save

0 commit comments

Comments
 (0)