File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -256,7 +256,10 @@ def process_args(args):
256
256
args .bids )
257
257
continue
258
258
259
- anon_sid = anonymize_sid (sid , args .anon_cmd )
259
+ anon_sid = anonymize_sid (sid , args .anon_cmd ) if args .anon_cmd else None
260
+ if args .anon_cmd :
261
+ lgr .info ('Anonymized {} to {}' .format (sid , anon_sid ))
262
+
260
263
study_outdir = op .join (outdir , locator or '' )
261
264
anon_outdir = args .conv_outdir or outdir
262
265
anon_study_outdir = op .join (anon_outdir , locator or '' )
Original file line number Diff line number Diff line change @@ -98,12 +98,9 @@ def dec(obj):
98
98
99
99
100
100
def anonymize_sid (sid , anon_sid_cmd ):
101
- if anon_sid_cmd is not None :
102
- from subprocess import check_output
103
- anon_sid = check_output ([anon_sid_cmd , sid ]).strip ()
104
- lgr .info ("Anonymized sid %s into %s" , sid , anon_sid )
105
- return anon_sid
106
- return
101
+ from subprocess import check_output
102
+ cmd = [anon_sid_cmd , sid ]
103
+ return check_output (cmd ).strip ()
107
104
108
105
109
106
def create_file_if_missing (filename , content ):
You can’t perform that action at this time.
0 commit comments