فهرست منبع

add try-catch in kill_all.py

fangjiasheng 2 سال پیش
والد
کامیت
349554dacc
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      format_convert/kill_all.py

+ 4 - 1
format_convert/kill_all.py

@@ -32,7 +32,10 @@ def kill():
             if re.search(project_path, process_cmd):
                 comm = "kill -9 " + str(pid)
                 print(comm, process_cmd)
-                os.system(comm)
+                try:
+                    os.system(comm)
+                except:
+                    continue
     else:
         print("cannot kill! checkout config...")
         print(ip_port_dict)