From 98dfebc3aaf45276d86f30b5e1ce9c4cb1f898aa Mon Sep 17 00:00:00 2001 From: halcyon <864072399@qq.com> Date: Tue, 17 Mar 2015 17:18:41 +0800 Subject: [PATCH] jlog --- connect.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/connect.py b/connect.py index 9eab35dc5..4a48827b1 100755 --- a/connect.py +++ b/connect.py @@ -108,8 +108,7 @@ def log_record(username, host): remote_ip = os.popen("who |grep `ps aux |gawk '{if ($2==%s) print $1}'` |gawk '{print $5}'|tr -d '()'" % pid).readlines() for ip in remote_ip: ip_list.append(ip.strip('\n')) - print ip_list - ip_list = list(set(ip_list)) + ip_list = ','.join(list(set(ip_list))) if not os.path.isdir(today_connect_log_dir): try: