]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
Fix broken python console
authorCédric Aguerre <cedric.aguerre@edf.fr>
Mon, 7 Dec 2015 16:58:10 +0000 (17:58 +0100)
committerCédric Aguerre <cedric.aguerre@edf.fr>
Mon, 7 Dec 2015 16:58:10 +0000 (17:58 +0100)
src/PyInterp/PyInterp_Interp.cxx

index f2c286d43ab2f8f23bc9f582492bf03e7f553906..5da3c537f5fa797b73880988fdfe81f8da4bda32 100644 (file)
@@ -450,7 +450,7 @@ static int compile_command(const char *command, PyObject * global_ctxt, PyObject
   std::string singleCommand = command;
   std::string commandArgs = "";
 
-  while (singleCommand.size() > 0 && singleCommand.at(singleCommand.size()-1) == '\n')
+  if (singleCommand.size() > 0 && singleCommand.at(singleCommand.size()-1) == '\n')
     singleCommand.erase(singleCommand.size()-1);
   std::size_t pos = singleCommand.find("args:");
   if (pos != std::string::npos) {