Skip to content

Commit baeb1d6

Browse files
committed
fix: apply @mgxd's suggestions
1 parent 881993e commit baeb1d6

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

fmriprep/cli/workflow.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -106,12 +106,12 @@ def build_boilerplate(config_file, workflow):
106106
config.load(config_file)
107107
logs_path = config.execution.output_dir / 'fmriprep' / 'logs'
108108
boilerplate = workflow.visit_desc()
109+
citation_files = {
110+
ext: logs_path / ('CITATION.%s' % ext)
111+
for ext in ('bib', 'tex', 'md', 'html')
112+
}
109113

110114
if boilerplate:
111-
citation_files = {
112-
ext: logs_path / ('CITATION.%s' % ext)
113-
for ext in ('bib', 'tex', 'md', 'html')
114-
}
115115
# To please git-annex users and also to guarantee consistency
116116
# among different renderings of the same file, first remove any
117117
# existing one
@@ -123,11 +123,6 @@ def build_boilerplate(config_file, workflow):
123123

124124
citation_files['md'].write_text(boilerplate)
125125

126-
citation_files = {
127-
ext: config.execution.output_dir / 'fmriprep' / 'logs'
128-
/ ('CITATION.%s' % ext) for ext in ('bib', 'tex', 'md', 'html')
129-
}
130-
131126
if not config.execution.md_only_boilerplate and citation_files['md'].exists():
132127
from subprocess import check_call, CalledProcessError, TimeoutExpired
133128
from pkg_resources import resource_filename as pkgrf

0 commit comments

Comments
 (0)