From 78ff748679dae97d3b3e2efa78c11edf21aa731c Mon Sep 17 00:00:00 2001 From: Suvarna_Narayanan Date: Sat, 27 Dec 2025 18:56:54 +0530 Subject: [PATCH] ssh win fix + test import env case fix --- plumbum/machines/ssh_machine.py | 4 ++-- tests/test_env.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plumbum/machines/ssh_machine.py b/plumbum/machines/ssh_machine.py index 029e251a..7a016c3f 100644 --- a/plumbum/machines/ssh_machine.py +++ b/plumbum/machines/ssh_machine.py @@ -384,7 +384,7 @@ def download(self, src: str | RemotePath, dst: str | LocalPath) -> None: raise TypeError(f"src {src!r} points to a different remote machine") if isinstance(dst, RemotePath): raise TypeError(f"dst of download cannot be {dst!r}") - if IS_WIN32: + if not IS_WIN32: src = self._translate_drive_letter(src) dst = self._translate_drive_letter(dst) self._scp_command(f"{self._fqhost}:{shquote(src)}", dst) @@ -396,7 +396,7 @@ def upload(self, src: str | LocalPath, dst: str | RemotePath) -> None: raise TypeError(f"dst of upload cannot be {dst!r}") if isinstance(dst, RemotePath) and dst.remote != self: raise TypeError(f"dst {dst!r} points to a different remote machine") - if IS_WIN32: + if not IS_WIN32: src = self._translate_drive_letter(src) dst = self._translate_drive_letter(dst) self._scp_command(src, f"{self._fqhost}:{shquote(dst)}") diff --git a/tests/test_env.py b/tests/test_env.py index a822dc19..2633fc17 100644 --- a/tests/test_env.py +++ b/tests/test_env.py @@ -5,7 +5,7 @@ from plumbum import local from plumbum._testtools import skip_on_windows -with contextlib.suppress(ModuleNotFoundError): +with contextlib.suppress(ModuleNotFoundError, ImportError): from plumbum.cmd import printenv