Browse files

Replaced the exit statement with the a proper error.

1) An error is raised when the number of parameters mismatch between the
doc string and the run method.
2) Tetsed the change with dipy_info and a manual workflow and the error is
raised properly.
  • Loading branch information...
Parichit Sharma
Parichit Sharma committed May 31, 2018
1 parent 65dcbbc commit 564f2126ae860da0845e3f5f922eacaec08dcfe9
Showing with 4 additions and 5 deletions.
  1. +4 −5 dipy/workflows/
@@ -121,11 +121,10 @@ def add_workflow(self, workflow):
# in the workflow python script.

if len_args != len(self.doc):
print(self.prog+": Number of parameters in the doc string and "
"run method does not match. Please ensure that"
" the number of parameters in the run method is"
" the same as the doc string.")
raise ValueError(self.prog+": Number of parameters in the"
" doc string and run method does not match."
" Please ensure that the number of parameters"
" in the run method is same as the doc string.")

for i, arg in enumerate(args):

0 comments on commit 564f212

Please sign in to comment.