summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/modules/python
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/modules/python')
-rw-r--r--sca-cpp/trunk/modules/python/mod-python.cpp2
-rw-r--r--sca-cpp/trunk/modules/python/mod-python.hpp4
-rwxr-xr-xsca-cpp/trunk/modules/python/server-test1
-rwxr-xr-xsca-cpp/trunk/modules/python/wiring-test1
4 files changed, 6 insertions, 2 deletions
diff --git a/sca-cpp/trunk/modules/python/mod-python.cpp b/sca-cpp/trunk/modules/python/mod-python.cpp
index 89a2db1b33..956edf1059 100644
--- a/sca-cpp/trunk/modules/python/mod-python.cpp
+++ b/sca-cpp/trunk/modules/python/mod-python.cpp
@@ -73,6 +73,8 @@ const failable<lambda<value(const list<value>&)> > evalImplementation(const stri
}
if (contains(itype, ".cpp"))
return modcpp::evalImplementation(path, impl, px);
+ if (contains(itype, ".widget"))
+ return mkfailure<lambda<value(const list<value>&)> >(string("Unsupported implementation type: ") + itype, -1, false);
return mkfailure<lambda<value(const list<value>&)> >(string("Unsupported implementation type: ") + itype);
}
diff --git a/sca-cpp/trunk/modules/python/mod-python.hpp b/sca-cpp/trunk/modules/python/mod-python.hpp
index a4d77775a5..e6effb985b 100644
--- a/sca-cpp/trunk/modules/python/mod-python.hpp
+++ b/sca-cpp/trunk/modules/python/mod-python.hpp
@@ -52,7 +52,7 @@ struct applyImplementation {
const value expr = append<value>(params, px);
debug(expr, "modeval::python::applyImplementation::input");
const failable<value> res = python::evalScript(expr, impl, py);
- const value val = !hasContent(res)? mklist<value>(value(), reason(res)) : mklist<value>(content(res));
+ const value val = !hasContent(res)? mklist<value>(value(), reason(res), rcode(res)) : mklist<value>(content(res));
debug(val, "modeval::python::applyImplementation::result");
return val;
}
@@ -70,7 +70,7 @@ const failable<lambda<value(const list<value>&)> > evalImplementation(const stri
return mkfailure<lambda<value(const list<value>&)> >(string("Could not read implementation: ") + fpath);
const failable<PyObject*> script = python::readScript(python::moduleName(spath), fpath, is, py);
if (!hasContent(script))
- return mkfailure<lambda<value(const list<value>&)> >(reason(script));
+ return mkfailure<lambda<value(const list<value>&)> >(script);
return lambda<value(const list<value>&)>(applyImplementation(content(script), px, py));
}
diff --git a/sca-cpp/trunk/modules/python/server-test b/sca-cpp/trunk/modules/python/server-test
index ecde5ca8ad..6ab5823643 100755
--- a/sca-cpp/trunk/modules/python/server-test
+++ b/sca-cpp/trunk/modules/python/server-test
@@ -18,6 +18,7 @@
# under the License.
# Setup
+rm -rf tmp
../http/httpd-conf tmp localhost 8090 ../server/htdocs
../http/httpd-event-conf tmp
../server/server-conf tmp
diff --git a/sca-cpp/trunk/modules/python/wiring-test b/sca-cpp/trunk/modules/python/wiring-test
index 4dd3ca7228..899c3eb5a1 100755
--- a/sca-cpp/trunk/modules/python/wiring-test
+++ b/sca-cpp/trunk/modules/python/wiring-test
@@ -22,6 +22,7 @@ here=`echo "import os; print os.path.realpath('$0')" | python`; here=`dirname $h
curl_prefix=`cat $here/../http/curl.prefix`
# Setup
+rm -rf tmp
../http/httpd-conf tmp localhost 8090 ../server/htdocs
../http/httpd-event-conf tmp
../server/server-conf tmp