bugfix ip_list

bugfix ip_list
pull/19/head
IYism 2015-09-25 16:30:15 +08:00
parent a4ac98332b
commit 2f5cf429ed
1 changed files with 1 additions and 1 deletions

View File

@ -91,7 +91,7 @@ def log_record(username, host):
dept_name = User.objects.get(username=username).dept.name
pid = os.getpid()
pts = os.popen("ps axu | awk '$2==%s{ print $7 }'" % pid).read().strip()
ip_list = os.popen("who | awk '$2==%s{ print $5 }'" % pts).read().strip('()\n')
ip_list = os.popen("who | awk '$2==\"%s\"{ print $5 }'" % pts).read().strip('()\n')
if not os.path.isdir(today_connect_log_dir):
try: