From d49e9123a09ff7dd4a203254ef6e374086d6ac06 Mon Sep 17 00:00:00 2001 From: Ben Kirwin Date: Sun, 5 Jan 2025 18:31:20 -0500 Subject: [PATCH 1/2] FIX: check for proper device string --- codexctl/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codexctl/__init__.py b/codexctl/__init__.py index 680d9e7..6467306 100644 --- a/codexctl/__init__.py +++ b/codexctl/__init__.py @@ -179,7 +179,7 @@ def call_func(self, function: str, args: dict) -> None: elif function in ("install", "status", "restore"): remote = False - if "remarkable" not in self.device: + if "reMarkable" not in self.device: if importlib.util.find_spec("paramiko") is None: raise ImportError( "Paramiko is required for SSH access. Please install it." From 9c3cd43f235c6d74a6731b0b27abacd7d84e281a Mon Sep 17 00:00:00 2001 From: Ben Kirwin Date: Sun, 5 Jan 2025 18:32:27 -0500 Subject: [PATCH 2/2] Let the SSH library fail if the keyfile is invalid --- codexctl/device.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/codexctl/device.py b/codexctl/device.py index 8313419..4dc50a0 100644 --- a/codexctl/device.py +++ b/codexctl/device.py @@ -194,10 +194,6 @@ def connect_to_device( while True: key_path = input("Enter path to SSH key: ") - if not os.path.isfile(key_path): - print("Invalid path given") - - continue try: self.logger.debug( f"Attempting to connect to {remote_address} with key file {key_path}"