From e52190e22bf8bbf97906333b9515d668c33bfb8a Mon Sep 17 00:00:00 2001 From: William Falcon Date: Wed, 24 Jul 2019 14:55:00 -0400 Subject: [PATCH] added auto port find --- tests/debug.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/debug.py b/tests/debug.py index 770cb37a..11ca8c65 100644 --- a/tests/debug.py +++ b/tests/debug.py @@ -127,10 +127,11 @@ def main(): clear_save_dir() -import subprocess -import re def get_pids(port): + import subprocess + import re + command = "sudo lsof -i :%s | awk '{print $2}'" % port pids = subprocess.check_output(command, shell=True) pids = pids.strip()