소스 검색

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 년 전
부모
커밋
72efd558a6
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  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);
     }