summaryrefslogtreecommitdiff
path: root/src/pyinterp.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2012-05-14 21:36:42 -0600
committerJohn Wiegley <johnw@newartisans.com>2012-05-14 21:44:00 -0600
commitf4f3058b8cd75c04080f9b68cb54b9584eafb39f (patch)
treeeca9ca6ceca001209fb93c05b52e21031280d18c /src/pyinterp.cc
parent96172669053bbba7263a370f109f70615049a0c6 (diff)
downloadfork-ledger-f4f3058b8cd75c04080f9b68cb54b9584eafb39f.tar.gz
fork-ledger-f4f3058b8cd75c04080f9b68cb54b9584eafb39f.tar.bz2
fork-ledger-f4f3058b8cd75c04080f9b68cb54b9584eafb39f.zip
Switch to using Boost.Format
Diffstat (limited to 'src/pyinterp.cc')
-rw-r--r--src/pyinterp.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pyinterp.cc b/src/pyinterp.cc
index 8d9c8c84..3c864910 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -113,12 +113,12 @@ void python_module_t::import_module(const string& name, bool import_direct)
object mod = python::import(name.c_str());
if (! mod)
throw_(std::runtime_error,
- _("Module import failed (couldn't find %1)") << name);
+ _f("Module import failed (couldn't find %1%)") % name);
dict globals = extract<dict>(mod.attr("__dict__"));
if (! globals)
throw_(std::runtime_error,
- _("Module import failed (couldn't find %1)") << name);
+ _f("Module import failed (couldn't find %1%)") % name);
if (! import_direct) {
module_object = mod;
@@ -246,7 +246,7 @@ object python_interpreter_t::import_option(const string& str)
}
catch (const error_already_set&) {
PyErr_Print();
- throw_(std::runtime_error, _("Python failed to import: %1") << str);
+ throw_(std::runtime_error, _f("Python failed to import: %1%") % str);
}
catch (...) {
throw;
@@ -582,7 +582,7 @@ value_t python_interpreter_t::functor_t::operator()(call_scope_t& args)
}
else if (PyErr_Occurred()) {
PyErr_Print();
- throw_(calc_error, _("Failed call to Python function '%1'") << name);
+ throw_(calc_error, _f("Failed call to Python function '%1%'") % name);
} else {
assert(false);
}
@@ -595,7 +595,7 @@ value_t python_interpreter_t::functor_t::operator()(call_scope_t& args)
catch (const error_already_set&) {
std::signal(SIGINT, sigint_handler);
PyErr_Print();
- throw_(calc_error, _("Failed call to Python function '%1'") << name);
+ throw_(calc_error, _f("Failed call to Python function '%1%'") % name);
}
catch (...) {
std::signal(SIGINT, sigint_handler);