|
From: <mk...@us...> - 2003-03-22 18:46:28
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Include
In directory sc8-pr-cvs1:/tmp/cvs-serv11177
Modified Files:
Shell.h
Log Message:
Index: Shell.h
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Include/Shell.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Shell.h 21 Mar 2003 20:08:35 -0000 1.1
--- Shell.h 22 Mar 2003 18:46:24 -0000 1.2
***************
*** 62,71 ****
std::string run(std::string const &command) {
PyObject *result;
! result = PyObject_CallMethod(m_Shell, "run", "s", command.c_str());
! if (result != NULL) {
! return PyString_AsString(result);
}
- // should never reach this point since the python method traps
- // exceptions and returns the error and traceback as a string
return "";
}
--- 62,73 ----
std::string run(std::string const &command) {
PyObject *result;
! if (m_Shell) {
! result = PyObject_CallMethod(m_Shell, "run", "s", command.c_str());
! if (result != NULL) {
! return PyString_AsString(result);
! }
! // should never reach this point since the python method traps
! // exceptions and returns the error and traceback as a string
}
return "";
}
|