added auto port find

This commit is contained in:
William Falcon
2019-07-24 14:54:20 -04:00
parent d0343604b3
commit 0c239da17c
+1
View File
@@ -134,6 +134,7 @@ def get_pids(port):
command = "sudo lsof -i :%s | awk '{print $2}'" % port
pids = subprocess.check_output(command, shell=True)
pids = pids.strip()
print(pids)
if pids:
pids = re.sub(' +', ' ', pids)
for pid in pids.split('\n'):