fix: remove unused subprocess import, guard logs dir in start_tunnel
This commit is contained in:
@@ -130,6 +130,7 @@ def start_tunnel(config_dir: Path, tunnel: TunnelConfig) -> int:
|
||||
raise click.ClickException(f"Port {tunnel.local_port} is already in use")
|
||||
|
||||
log_path = config_dir / "logs" / f"{tunnel.name}.log"
|
||||
log_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
env = os.environ.copy()
|
||||
env["AUTOSSH_GATETIME"] = "0"
|
||||
|
||||
|
||||
@@ -109,7 +109,6 @@ def test_read_pid_file_corrupt(config_dir):
|
||||
|
||||
import shutil
|
||||
import signal
|
||||
import subprocess
|
||||
import time
|
||||
from autossh_mgr.config import TunnelConfig
|
||||
from autossh_mgr.process import start_tunnel, stop_tunnel, build_autossh_cmd
|
||||
|
||||
Reference in New Issue
Block a user