From e4be5c34eb71da9a705bc62fdfcfe6d763022747 Mon Sep 17 00:00:00 2001 From: Alejandro Sirgo Rica Date: Tue, 26 Nov 2024 11:50:52 +0100 Subject: src: add support for direct command execution Update live shell run mode for the new REST API interface. Evaluate the "inline" field to diferentiate between execution of script in /opt/opengnsys/shell/ and a cmd execution. Remove usage of echo argument of the API REST. Update Windows and Linux mode for direct command execution. Set OutputEncoding environment variable to 'utf-8' in Windows to unify the encoding of stdout for the invoked programs. Decode stdout to utf-8-sig to remove potential BOM. While at this, remove strange legacy ;|\n\r terminator. --- src/restRequest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/restRequest.py') diff --git a/src/restRequest.py b/src/restRequest.py index 3098c1a..dc0e656 100644 --- a/src/restRequest.py +++ b/src/restRequest.py @@ -33,7 +33,7 @@ class restRequest: self.type = None self.profile = None self.id = None - self.echo = None + self.inline = None self.code = None self.seq = None self.backup = None @@ -72,7 +72,7 @@ class restRequest: if "run" in json_param: self.run = json_param["run"] try: - self.echo = json_param["echo"] + self.inline = json_param["inline"] except: pass @@ -160,8 +160,8 @@ class restRequest: def getId(self): return self.id - def getEcho(self): - return self.echo + def get_inline(self): + return self.inline def getCode(self): return self.code -- cgit v1.2.3-18-g5258