Browse Source

HPCC-10359 Embedded Python may fail due to ^M characters in source

This was fixed in 4.2.0 but the fix was lost in 5.0.2 and 5.0.4.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 năm trước cách đây
mục cha
commit
72efd558a6
1 tập tin đã thay đổi với 1 bổ sung0 xóa
  1. 1 0
      plugins/pyembed/pyembed.cpp

+ 1 - 0
plugins/pyembed/pyembed.cpp

@@ -381,6 +381,7 @@ PyObject *PythonThreadContext::compileEmbeddedScript(size32_t lenChars, const ch
     if (!prevtext || strcmp(text, prevtext) != 0)
     {
         prevtext.clear();
+        text.stripChar('\r');
         script.setown(globalState.compileScript(text));
         prevtext.set(utf, bytes);
     }