summaryrefslogtreecommitdiff
path: root/src/pyinterp.cc
diff options
context:
space:
mode:
authorCraig Earls <enderw88@gmail.com>2011-10-06 22:07:01 -0700
committerCraig Earls <enderw88@gmail.com>2011-10-06 22:07:01 -0700
commitb400d65be082165f44e769605aa6a78133cf6d9a (patch)
tree27b18ee35a5c4f60a10cf4f626e15ac30276040b /src/pyinterp.cc
parente9ccb012c2c5ffe0e9f4916ee859bda95d9d4248 (diff)
parentf0791bbd7297e737d9e13d0b0bb21473b173b2a7 (diff)
downloadfork-ledger-b400d65be082165f44e769605aa6a78133cf6d9a.tar.gz
fork-ledger-b400d65be082165f44e769605aa6a78133cf6d9a.tar.bz2
fork-ledger-b400d65be082165f44e769605aa6a78133cf6d9a.zip
Merge remote branch 'upstream/next' into next
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 e0801604..e0fd2d59 100644
--- a/src/pyinterp.cc
+++ b/src/pyinterp.cc
@@ -126,7 +126,7 @@ void python_interpreter_t::initialize()
void python_interpreter_t::hack_system_paths()
{
// Hack ledger.__path__ so it points to a real location
- python::object sys_module = python::import("sys");
+ python::object sys_module = python::import("sys");
python::object sys_dict = sys_module.attr("__dict__");
python::list paths(sys_dict["path"]);
@@ -177,7 +177,7 @@ object python_interpreter_t::import_into_main(const string& str)
if (! mod)
throw_(std::runtime_error,
_("Failed to import Python module %1") << str);
-
+
// Import all top-level entries directly into the main namespace
main_nspace.update(mod.attr("__dict__"));
@@ -193,7 +193,7 @@ object python_interpreter_t::import_option(const string& str)
{
path file(str);
- python::object sys_module = python::import("sys");
+ python::object sys_module = python::import("sys");
python::object sys_dict = sys_module.attr("__dict__");
python::list paths(sys_dict["path"]);
@@ -312,7 +312,7 @@ value_t python_interpreter_t::python_command(call_scope_t& args)
delete[] argv;
throw;
}
-
+
for (std::size_t i = 0; i < args.size() + 1; i++)
delete[] argv[i];
delete[] argv;
@@ -445,7 +445,7 @@ namespace {
}
}
}
-
+
value_t python_interpreter_t::functor_t::operator()(call_scope_t& args)
{
try {