Skip to content

Commit

Permalink
Merge pull request #376 from romainfrancois/execute_request__executio…
Browse files Browse the repository at this point in the history
…n_count

`xkernel_core::execute_request` sets `execution_count` from `reply`
  • Loading branch information
JohanMabille authored Dec 15, 2023
2 parents 24d1615 + 06e9867 commit 170097c
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/xkernel_core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,6 @@ namespace xeus
std::string code = content.value("code", "");
bool silent = content.value("silent", false);
bool store_history = content.value("store_history", true);
int execution_count = content.value("execution_count", 1);
store_history = store_history && !silent;
nl::json user_expression = content.value("user_expressions", nl::json::object());
bool allow_stdin = content.value("allow_stdin", true);
Expand All @@ -237,7 +236,7 @@ namespace xeus

nl::json reply = p_interpreter->execute_request(
code, silent, store_history, std::move(user_expression), allow_stdin);

int execution_count = reply.value("execution_count", 1);
std::string status = reply.value("status", "error");
send_reply("execute_reply", std::move(metadata), std::move(reply), c);

Expand Down

0 comments on commit 170097c

Please sign in to comment.