Your Name 3 年之前
父節點
當前提交
18df1c1162
共有 1 個文件被更改,包括 5 次插入2 次删除
  1. 5 2
      hhh/aws-monitor/cl-test.py

+ 5 - 2
hhh/aws-monitor/cl-test.py

@@ -8,12 +8,15 @@ cmds=cmd.split(' ')
 cl=subprocess.Popen(cmds, stdout=subprocess.PIPE)
 lst=[]
 
+def proc_l(l):
+    return l.replace(',','').replace('\n','').strip()
 for l in io.TextIOWrapper(cl.stdout, encoding="utf-8"):
     if '"AccessKeyId":' in l:
-        lst.append(l)
+    
+        lst.append(proc_l(l))
 
     if '"EventName":' in l:
-        lst.append(l)
+        lst.append(proc_l(l))
 #lines = cl.stdout.readlines()
 #clstr=str(cl)
 #lines=clstr.split('\n')