|
@@ -22,7 +22,8 @@ def exe_str_cmd():
|
|
|
exec_str = req_json.get('exec_str')
|
|
|
if before_str is not None and len(before_str) > 1:
|
|
|
exec_str = before_str + '\n' + exec_str
|
|
|
- exec_str = " && ".join(list(filter(lambda x: not str.startswith(x, "#"), exec_str.splitlines())))
|
|
|
+ exec_str = " && ".join(
|
|
|
+ list(filter(lambda x: not (str.startswith(x, "#") or len(x) <= 1), exec_str.splitlines())))
|
|
|
result_str = run_cmd(client, exec_str)
|
|
|
client.close()
|
|
|
return result_str
|