+ Avoid to unnecessarily throw Py::Exception
This commit is contained in:
@@ -57,6 +57,15 @@ PythonStdout::~PythonStdout()
|
||||
{
|
||||
}
|
||||
|
||||
Py::Object PythonStdout::getattr(const char *name)
|
||||
{
|
||||
if (strcmp(name, "softspace") == 0) {
|
||||
int i=0;
|
||||
return Py::Int(i);
|
||||
}
|
||||
return getattr_methods(name);
|
||||
}
|
||||
|
||||
Py::Object PythonStdout::repr()
|
||||
{
|
||||
std::string s;
|
||||
@@ -119,6 +128,15 @@ PythonStderr::~PythonStderr()
|
||||
{
|
||||
}
|
||||
|
||||
Py::Object PythonStderr::getattr(const char *name)
|
||||
{
|
||||
if (strcmp(name, "softspace") == 0) {
|
||||
int i=0;
|
||||
return Py::Int(i);
|
||||
}
|
||||
return getattr_methods(name);
|
||||
}
|
||||
|
||||
Py::Object PythonStderr::repr()
|
||||
{
|
||||
std::string s;
|
||||
@@ -180,6 +198,15 @@ OutputStdout::~OutputStdout()
|
||||
{
|
||||
}
|
||||
|
||||
Py::Object OutputStdout::getattr(const char *name)
|
||||
{
|
||||
if (strcmp(name, "softspace") == 0) {
|
||||
int i=0;
|
||||
return Py::Int(i);
|
||||
}
|
||||
return getattr_methods(name);
|
||||
}
|
||||
|
||||
Py::Object OutputStdout::repr()
|
||||
{
|
||||
std::string s;
|
||||
@@ -239,6 +266,15 @@ OutputStderr::~OutputStderr()
|
||||
{
|
||||
}
|
||||
|
||||
Py::Object OutputStderr::getattr(const char *name)
|
||||
{
|
||||
if (strcmp(name, "softspace") == 0) {
|
||||
int i=0;
|
||||
return Py::Int(i);
|
||||
}
|
||||
return getattr_methods(name);
|
||||
}
|
||||
|
||||
Py::Object OutputStderr::repr()
|
||||
{
|
||||
std::string s;
|
||||
|
||||
Reference in New Issue
Block a user