fixes, cleanup, pyproject.toml

This commit is contained in:
2026-03-19 19:44:04 -06:00
parent 222dbee9aa
commit 459c81e10c
4 changed files with 64 additions and 24 deletions

View File

@@ -98,7 +98,7 @@ class SSHConnector(Connector):
self, cmdline: str, text: bool = False, capture: bool = False
) -> str:
cmd = self._ssh_args([self.ssh_host, cmdline])
#print("running: ", shlex.join(cmd))
# print("running: ", shlex.join(cmd))
if capture:
return subprocess.check_output(cmd, text=text)
subprocess.run(cmd, check=True)
@@ -106,7 +106,9 @@ class SSHConnector(Connector):
def create_remote_files(self, content_by_name: dict, remote_directory: str):
if not content_by_name:
raise ValueError("require at least one file to copy")
with tempfile.TemporaryDirectory(dir=self.temporary_directory, prefix="mtik-connector-tmp") as td:
with tempfile.TemporaryDirectory(
dir=self.temporary_directory, prefix="mtik-connector-tmp"
) as td:
tempfile_paths = []
# Write the files to a temporary directory
@@ -127,5 +129,5 @@ class SSHConnector(Connector):
f"{self.ssh_host}:{remote_directory}",
]
)
#print("running: ", shlex.join(cmd))
# print("running: ", shlex.join(cmd))
subprocess.run(cmd, check=True)