mirror of
https://github.com/worldforge/cyphesis
synced 2026-08-13 12:26:04 -04:00
Make macros conformant.
This commit is contained in:
parent
ff7b3d82f6
commit
cfffeb1711
24 changed files with 286 additions and 269 deletions
|
|
@ -56,16 +56,18 @@ int python_client_script(const std::string & package,
|
|||
for (auto& entry : keywords) {
|
||||
kwds.setAttr(entry.first, Py::String(entry.second));
|
||||
}
|
||||
auto ret = callable.apply(args, kwds);
|
||||
|
||||
if (ret.isNull()) {
|
||||
try {
|
||||
auto ret = callable.apply(args, kwds);
|
||||
} catch (...) {
|
||||
if (PyErr_Occurred() == nullptr) {
|
||||
std::cerr << "Could not call function" << std::endl << std::flush;
|
||||
log(ERROR, "Could not call function");
|
||||
} else {
|
||||
std::cerr << "Reporting python error" << std::endl << std::flush;
|
||||
log(ERROR, "Reporting python error");
|
||||
PyErr_Print();
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue