Monte carlo AttributeError's caused by bad configuration still returns zero in master sim #269

The return code from parsing the monte carlo input was always set to zero and not checked.
Retured the return code from parsing the input. Added an exit if the input was not parsed
correctly.
This commit is contained in:
Alex Lin
2016-07-26 13:40:38 -05:00
parent 2112dac2e0
commit bc6cb589e3
6 changed files with 16 additions and 6 deletions

View File

@ -141,12 +141,13 @@ int Trick::IPPython::init() {
//Command to parse the given string.
int Trick::IPPython::parse(std::string in_string) {
int ret ;
pthread_mutex_lock(&ip_mutex);
in_string += "\n" ;
PyRun_SimpleString(in_string.c_str()) ;
ret = PyRun_SimpleString(in_string.c_str()) ;
pthread_mutex_unlock(&ip_mutex);
return 0 ;
return ret ;
}