Selaa lähdekoodia

Merge branch 'release/1.1.1'

tianyunperfect 5 vuotta sitten
vanhempi
commit
e375a0fd82
1 muutettua tiedostoa jossa 2 lisäystä ja 1 poistoa
  1. 2 1
      app.py

+ 2 - 1
app.py

@@ -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