Skip to content

Commit 029ddda

Browse files
committed
fix CLI for print_usage commands fail print_help
1 parent d448c7f commit 029ddda

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

nipype/scripts/cli.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ def run(ctx, module, interface, list, help):
137137

138138
if not ctx.args:
139139
# print the interface help
140-
iface_parser.print_help()
140+
try:
141+
iface_parser.print_help()
142+
except:
143+
print('An error ocurred when trying to print the full'
144+
'command help, printing usage.')
145+
finally:
146+
iface_parser.print_usage()
141147
else:
142148
# run the interface
143149
args = iface_parser.parse_args(args=ctx.args)

0 commit comments

Comments
 (0)