fixes, cleanup, pyproject.toml
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user