diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-02-19 20:29:43 +0100 |
---|---|---|
committer | Martin Michlmayr <tbm@cyrius.com> | 2023-02-20 12:08:04 +0800 |
commit | 7de9854f4c1115611ee9cfa1a68987a1ec7dc905 (patch) | |
tree | 2bdb1e72121618ccb91d02e3c2b8aed95f97ed1f /src/pyinterp.cc | |
parent | 4de50f49a1a20e59b2a97743ac80b85920e94ac5 (diff) | |
download | fork-ledger-7de9854f4c1115611ee9cfa1a68987a1ec7dc905.tar.gz fork-ledger-7de9854f4c1115611ee9cfa1a68987a1ec7dc905.tar.bz2 fork-ledger-7de9854f4c1115611ee9cfa1a68987a1ec7dc905.zip |
Remove unused server related code
Diffstat (limited to 'src/pyinterp.cc')
-rw-r--r-- | src/pyinterp.cc | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/src/pyinterp.cc b/src/pyinterp.cc index 43859b84..6a261609 100644 --- a/src/pyinterp.cc +++ b/src/pyinterp.cc @@ -362,44 +362,6 @@ value_t python_interpreter_t::python_command(call_scope_t& args) return NULL_VALUE; } -value_t python_interpreter_t::server_command(call_scope_t& args) -{ - if (! is_initialized) - initialize(); - - python::object server_module; - - try { - server_module = python::import("ledger.server"); - if (! server_module) - throw_(std::runtime_error, - _("Could not import ledger.server; please check your PYTHONPATH")); - } - catch (const error_already_set&) { - PyErr_Print(); - throw_(std::runtime_error, - _("Could not import ledger.server; please check your PYTHONPATH")); - } - - if (python::object main_function = server_module.attr("main")) { - functor_t func(main_function, "main"); - try { - func(args); - return true; - } - catch (const error_already_set&) { - PyErr_Print(); - throw_(std::runtime_error, - _("Error while invoking ledger.server's main() function")); - } - } else { - throw_(std::runtime_error, - _("The ledger.server module is missing its main() function!")); - } - - return false; -} - option_t<python_interpreter_t> * python_interpreter_t::lookup_option(const char * p) { @@ -474,11 +436,6 @@ expr_t::ptr_op_t python_interpreter_t::lookup(const symbol_t::kind_t kind, if (is_eq(p, "python")) return MAKE_FUNCTOR(python_interpreter_t::python_command); break; - - case 's': - if (is_eq(p, "server")) - return MAKE_FUNCTOR(python_interpreter_t::server_command); - break; } } |