From 715d2a1effa279b5eabbf231e65681a01bba841f Mon Sep 17 00:00:00 2001
From: Peter Neher
Date: Wed, 6 Feb 2019 09:10:02 +0100
Subject: [PATCH] Use unix linsep for python function output
---
cmdint/CmdInterface.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/cmdint/CmdInterface.py b/cmdint/CmdInterface.py
index eb14be1..3122df8 100644
--- a/cmdint/CmdInterface.py
+++ b/cmdint/CmdInterface.py
@@ -444,7 +444,7 @@ def __pyfunction_to_log(self):
kwargs=self.__options)
proc.start()
while proc.is_alive():
- self.__log['command']['text_output'] = out_string.getvalue().split(os.linesep)
+ self.__log['command']['text_output'] = out_string.getvalue().split('\n')
self.update_log()
time.sleep(5)
self.__py_function_return = proc.get_retval()
@@ -453,7 +453,7 @@ def __pyfunction_to_log(self):
exception = 'Exception: ' + str(err)
sys.stdout = original_stdout
sys.stderr = original_stderr
- self.__log['command']['text_output'] = out_string.getvalue().split(os.linesep)
+ self.__log['command']['text_output'] = out_string.getvalue().split('\n')
if exception is not None:
self.__log['command']['text_output'].append(exception)
self.update_log()