summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-02-19 20:29:43 +0100
committerMartin Michlmayr <tbm@cyrius.com>2023-02-20 12:08:04 +0800
commit7de9854f4c1115611ee9cfa1a68987a1ec7dc905 (patch)
tree2bdb1e72121618ccb91d02e3c2b8aed95f97ed1f /src
parent4de50f49a1a20e59b2a97743ac80b85920e94ac5 (diff)
downloadfork-ledger-7de9854f4c1115611ee9cfa1a68987a1ec7dc905.tar.gz
fork-ledger-7de9854f4c1115611ee9cfa1a68987a1ec7dc905.tar.bz2
fork-ledger-7de9854f4c1115611ee9cfa1a68987a1ec7dc905.zip
Remove unused server related code
Diffstat (limited to 'src')
-rw-r--r--src/pyinterp.cc43
-rw-r--r--src/pyinterp.h1
2 files changed, 0 insertions, 44 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;
}
}
diff --git a/src/pyinterp.h b/src/pyinterp.h
index b85d7ce8..c19adfc2 100644
--- a/src/pyinterp.h
+++ b/src/pyinterp.h
@@ -106,7 +106,6 @@ public:
}
value_t python_command(call_scope_t& scope);
- value_t server_command(call_scope_t& args);
class functor_t {
functor_t();