freemt
commited on
Commit
·
e9dba00
1
Parent(s):
9754a84
Update longer (500 chars) cmd
Browse files
app.py
CHANGED
@@ -35,6 +35,9 @@ def process(command):
|
|
35 |
# logger.info("input:\n\t %s", command)
|
36 |
# print("print input:\n\t %s" % command)
|
37 |
# print("print input*:\n\t %s" % "*".join(command.splitlines()))
|
|
|
|
|
|
|
38 |
is_command = True
|
39 |
is_command = command.strip().splitlines().__len__() < 2 and len(command.strip()) < 500
|
40 |
|
@@ -47,7 +50,6 @@ def process(command):
|
|
47 |
out, err = proc.communicate()
|
48 |
# success = True
|
49 |
return f"[{out}]", f"[{err}]"
|
50 |
-
|
51 |
except Exception as e:
|
52 |
out, err = "", str(e)
|
53 |
# success = False
|
|
|
35 |
# logger.info("input:\n\t %s", command)
|
36 |
# print("print input:\n\t %s" % command)
|
37 |
# print("print input*:\n\t %s" % "*".join(command.splitlines()))
|
38 |
+
|
39 |
+
logger.info("input: %s", command)
|
40 |
+
|
41 |
is_command = True
|
42 |
is_command = command.strip().splitlines().__len__() < 2 and len(command.strip()) < 500
|
43 |
|
|
|
50 |
out, err = proc.communicate()
|
51 |
# success = True
|
52 |
return f"[{out}]", f"[{err}]"
|
|
|
53 |
except Exception as e:
|
54 |
out, err = "", str(e)
|
55 |
# success = False
|